Skip to content

Commit a68094f

Browse files
author
Marco Pereirinha
committed
Fix the logic for enabled replacement of Woo gallery
1 parent e8037dc commit a68094f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

php/media/class-woocommercegallery.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,7 @@ public static function woocommerce_active() {
6868
* @return bool
6969
*/
7070
public function enabled() {
71-
return ! empty( $this->gallery->media->plugin->settings->get_value( 'gallery_woocommerce_enabled' ) ) ?
72-
(bool) $this->gallery->media->plugin->settings->get_value( 'gallery_woocommerce_enabled' ) :
73-
false;
71+
return 'on' === $this->gallery->media->plugin->settings->get_value( 'gallery_woocommerce_enabled' );
7472
}
7573

7674
/**

0 commit comments

Comments
 (0)