| @@ -11,10 +11,10 @@ | ||
| 11 | 11 | * Should we load the integration logic. |
| 12 | 12 | * |
| 13 | 13 | * @return bool Should we load. |
| 14 | 14 | */ |
| 15 | - function should_load() { | |
| 16 | - include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); | |
| 15 | + public function should_load() { | |
| 16 | + include_once ABSPATH . 'wp-admin/includes/plugin.php'; | |
| 17 | 17 | |
| 18 | 18 | return is_plugin_active( 'yith-woocommerce-quick-view/init.php' ); |
| 19 | 19 | } |
| 20 | 20 | |
| @@ -22,9 +22,14 @@ | ||
| 22 | 22 | * Register integration details. |
| 23 | 23 | */ |
| 24 | 24 | public function register() { |
| 25 | 25 | Optml_Url_Replacer::instance()->init(); |
| 26 | - add_filter( 'woocommerce_single_product_image_thumbnail_html', [ Optml_Main::instance()->manager, 'replace_content' ] ); | |
| 26 | + add_filter( | |
| 27 | + 'woocommerce_single_product_image_thumbnail_html', | |
| 28 | + function ( $html ) { | |
| 29 | + return Optml_Main::instance()->manager->replace_content( $html, true ); | |
| 30 | + } | |
| 31 | + ); | |
| 27 | 32 | } |
| 28 | 33 | |
| 29 | 34 | /** |
| 30 | 35 | * Should we early load the compatibility? |