Skip to content

Commit 3130a24

Browse files
authored
Merge pull request #899 from cloudinary/fix/woocommerce-gallery
Fix WooCommerce gallery
2 parents 9515ee4 + 5262fbc commit 3130a24

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

php/media/class-gallery.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,13 @@ public function get_config() {
131131
*/
132132
$config['container'] = apply_filters( 'cloudinary_gallery_html_container', '' );
133133

134+
$credentials = $this->plugin->components['connect']->get_credentials();
135+
136+
if ( ! empty( $credentials['cname'] ) ) {
137+
$config['secureDistribution'] = $credentials['cname'];
138+
$config['privateCdn'] = true;
139+
}
140+
134141
/**
135142
* Filter the gallery configuration.
136143
*

php/media/class-woocommercegallery.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function setup_hooks() {
9595
add_filter(
9696
'cloudinary_gallery_html_container',
9797
static function () {
98-
return '.woocommerce-product-gallery';
98+
return '.woocommerce-product-gallery__wrapper';
9999
}
100100
);
101101

0 commit comments

Comments
 (0)