[-] Add caption content to the Gallery Block

If you want to have the caption showing in the actual lightbox when using a Toolset Gallery Block, then you could add the snippet below.

jQuery(document).ready(function(){
jQuery('div.tb-brick__content').each(function(){
var caption= jQuery(this).find('.tb-gallery__caption').html();
jQuery(this).find('a').attr('data-title',caption);
});

});

What it does is that it will get the content of the caption that toolset added to the Image and will create a custom attribute that will allow the Lightbox to show the caption when you click an image of the gallery.

Use repeating image field in CRED New Product form to define Product Gallery images

A client wants to use CRED to create new WC Products. When creating the Product, the Client would like to upload multiple images that will be used to create an image gallery. The solution is to add a repeating image custom field, and use the cred_save_data hook to move those images out of the custom fields and into a product gallery.

Ticket link: https://wp-types.com/forums/topic/cred-repeating-image-fields-gallery-woo-and-non-woo/

/* ----------------------------------------------------------------------- */
// CREATE A PRODUCT IMAGE GALLERY USING A REPEATING IMAGE FIELD IN CRED
// User uploads to a repeating custom image field
// Images are automatically moved into product image gallery
// Custom fields are left blank
// keywords: cred, product, image, gallery, repeating, field

add_action('cred_save_data', 'cred_product_gallery_action',10,2);
function cred_product_gallery_action($post_id, $form_data)
{
    global $wpdb;
    // if a specific form
    if ($form_data['id']==12345)
    {
        if (isset($_POST['wpcf-product-gallery-image-cred']))
        {
           $list_ids = array();
            foreach($_POST['wpcf-product-gallery-image-cred'] as $url) {
              $item_id = $wpdb->get_col($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE guid='%s';", $url ));
              $list_ids[] = $item_id[0];
            }
            update_post_meta($post_id, '_product_image_gallery', implode($list_ids,','));
            delete_post_meta($post_id, 'wpcf-product-gallery-image-cred');
        }
    }
}