| @@ -16,11 +16,8 @@ | ||
| 16 | 16 | |
| 17 | 17 | public function __construct() { |
| 18 | 18 | add_action( 'wp_enqueue_scripts', [ $this, 'enqueue' ] ); |
| 19 | 19 | |
| 20 | - // Gallery Plugin Support rtwpvg_disable_enqueue_scripts | |
| 21 | - add_filter( 'rtwpvg_disable_enqueue_scripts', '__return_false', 11 ); | |
| 22 | - | |
| 23 | 20 | // Template. |
| 24 | 21 | |
| 25 | 22 | add_action( 'rtsb/modules/quick_view/frontend/display', [ $this, 'button_hook' ] ); |
| 26 | 23 | // Add do_action( 'rtsb/modules/quick_view/frontend/display' ); for display anywhere. |
| @@ -83,15 +80,9 @@ | ||
| 83 | 80 | // Set the main wp query for the product. |
| 84 | 81 | wp( 'p=' . $product_id . '&post_type=product' ); |
| 85 | 82 | |
| 86 | 83 | // Remove product thumbnails gallery. |
| 87 | - if ( defined('RTWPVG_VERSION') ) { | |
| 88 | - remove_action( 'woocommerce_product_thumbnails', 'woocommerce_show_product_thumbnails', 20 ); | |
| 89 | - } | |
| 90 | - if ( ! defined('RTWPVG_VERSION') ) { | |
| 91 | - add_action( 'woocommerce_product_thumbnails', [ $this, 'woocommerce_product_thumbnails_before' ], 1 ); | |
| 92 | - add_action( 'woocommerce_product_thumbnails', [ $this, 'woocommerce_product_thumbnails_after'], 25 ); | |
| 93 | - } | |
| 84 | + remove_action( 'woocommerce_product_thumbnails', 'woocommerce_show_product_thumbnails', 20 ); | |
| 94 | 85 | // Change template for variable products. |
| 95 | 86 | // if ( isset( $GLOBALS['yith_wccl'] ) ) { |
| 96 | 87 | // $GLOBALS['yith_wccl']->obj = new YITH_WCCL_Frontend(); |
| 97 | 88 | // $GLOBALS['yith_wccl']->obj->override(); |
| @@ -149,27 +140,8 @@ | ||
| 149 | 140 | } |
| 150 | 141 | // TODO:: Maybe this hooks is not working. Need to Check gutenberg compatibility. |
| 151 | 142 | // Add the link "Quick view" for Gutenberg blocks. |
| 152 | 143 | add_filter( 'woocommerce_blocks_product_grid_item_html', [ $this, 'add_button_for_block' ], 10, 3 ); |
| 153 | - } | |
| 154 | - | |
| 155 | - /** | |
| 156 | - * Print "Add to compare" button | |
| 157 | - * | |
| 158 | - * @return void | |
| 159 | - */ | |
| 160 | - public function woocommerce_product_thumbnails_before() { ?> | |
| 161 | - <div class="rtsb-gallery-images-wrapper"> | |
| 162 | - <?php | |
| 163 | - } | |
| 164 | - /** | |
| 165 | - * Print "Add to compare" button | |
| 166 | - * | |
| 167 | - * @return void | |
| 168 | - */ | |
| 169 | - public function woocommerce_product_thumbnails_after() { ?> | |
| 170 | - </div> | |
| 171 | - <?php | |
| 172 | 144 | } |
| 173 | 145 | |
| 174 | 146 | /** |
| 175 | 147 | * Print "Add to compare" button |