PluginProbe ʕ •ᴥ•ʔ
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution / 4.8.7
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution v4.8.7
4.9.1 4.9.0 2.0.0 2.1.0 2.2.0 2.2.1 2.2.2 2.3.0 2.4.0 2.5.0 2.5.1 3.0.0 3.1.0 3.1.1 4.0.0 4.0.1 4.1.0 4.1.1 4.2.0 4.2.1 4.3.0 4.3.1 4.4.0 4.5.0 4.5.1 4.6.0 4.6.1 4.6.2 4.6.3 4.6.4 4.6.5 4.6.6 4.6.7 4.6.8 4.6.9 4.7.0 4.7.1 4.7.2 4.7.3 4.7.4 4.7.5 4.7.6 4.7.7 4.7.8 4.7.9 4.8.0 4.8.1 4.8.2 4.8.3 4.8.4 4.8.5 4.8.6 4.8.7 4.8.8 4.8.9 trunk 0.1.2-beta 0.1.3-beta 0.1.4-beta 1.0.0 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.2.1 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.4.0 1.4.1 1.5.0 1.5.1 1.6.0 1.6.1 1.7.0 1.8.0 1.8.1 1.9.0
shopengine / compatibility / conflicts / theme-hooks.php
shopengine / compatibility / conflicts Last commit date
manifest.php 7 months ago theme-hooks.php 7 months ago
theme-hooks.php
1566 lines
1 <?php
2
3 namespace ShopEngine\Compatibility\Conflicts;
4
5
6 use ShopEngine\Traits\Singleton;
7
8 class Theme_Hooks {
9
10 use Singleton;
11
12 public function force_load_woocommerce_css($styles) {
13
14 if(!isset($styles['woocommerce-layout'])) {
15
16 $styles['woocommerce-layout'] = [
17 'src' => WC()->plugin_url() . '/assets/css/woocommerce-layout.css',
18 'deps' => '',
19 'version' => \Automattic\Jetpack\Constants::get_constant('WC_VERSION'),
20 'media' => 'all',
21 'has_rtl' => true,
22 ];
23 }
24
25
26 if(!isset($styles['woocommerce-general'])) {
27
28 $styles['woocommerce-general'] = [
29 'src' => WC()->plugin_url() . '/assets/css/woocommerce.css',
30 'deps' => '',
31 'version' => \Automattic\Jetpack\Constants::get_constant('WC_VERSION'),
32 'media' => 'all',
33 'has_rtl' => true,
34 ];
35 }
36
37
38 return $styles;
39 }
40
41
42 public function theme__conflicts__shop_and_archive() {
43 /**
44 * Common in multiple theme
45 *
46 */
47 $this->add_action_if_not_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5);
48 $this->add_action_if_not_exists('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart');
49
50 /*******************************************************
51 * Storefront theme hook reverting...
52 *
53 ******************************************************/
54
55 $this->remove_action_if_exists('woocommerce_before_shop_loop', 'storefront_sorting_wrapper', 9);
56 $this->remove_action_if_exists('woocommerce_before_shop_loop', 'storefront_sorting_wrapper_close', 31);
57 $this->remove_action_if_exists('woocommerce_before_shop_loop', 'storefront_woocommerce_pagination', 30);
58 $this->remove_action_if_exists('woocommerce_after_shop_loop', 'woocommerce_result_count', 20);
59
60 /**
61 * End of Storefront theme hook reverting
62 ******************************************************/
63
64 /*******************************************************
65 * xStore theme hook reverting in shop & archive page
66 *
67 ******************************************************/
68
69 $this->remove_action_if_exists('woocommerce_sale_flash', 'etheme_woocommerce_sale_flash', 20);
70 $this->remove_action_if_exists('woocommerce_before_shop_loop', 'etheme_grid_list_switcher', 35);
71 $this->remove_action_if_exists('woocommerce_before_shop_loop', 'etheme_products_per_page_select', 37);
72 $this->remove_action_if_exists('woocommerce_after_shop_loop', 'woocommerce_result_count', 5);
73
74 /**
75 * End of xStore theme hook reverting
76 ******************************************************/
77
78
79 /*******************************************************
80 * Astra theme hook reverting...
81 *
82 ******************************************************/
83
84 if(has_action('woocommerce_before_main_content', 'woocommerce_output_content_wrapper') === false) {
85 add_action('woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
86 }
87
88 if(has_action('woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end') === false) {
89 add_action('woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);
90 }
91
92 if(has_action('woocommerce_sidebar', 'woocommerce_get_sidebar') === false) {
93 add_action('woocommerce_sidebar', 'woocommerce_get_sidebar', 10);
94 }
95
96 if(has_action('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title') === false) {
97 add_action('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 10);
98 }
99
100 if(has_action('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price') === false) {
101 add_action('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10);
102 }
103
104 if(has_action('woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash') === false) {
105 add_action('woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 10);
106 }
107
108 if(has_action('woocommerce_before_shop_loop_item', 'astra_woo_shop_thumbnail_wrap_start') !== false) {
109 remove_action('woocommerce_before_shop_loop_item', 'astra_woo_shop_thumbnail_wrap_start', 6);
110 }
111
112 if(has_action('woocommerce_before_shop_loop_item', 'woocommerce_show_product_loop_sale_flash') !== false) {
113 remove_action('woocommerce_before_shop_loop_item', 'woocommerce_show_product_loop_sale_flash', 9);
114 }
115
116 if(has_action('woocommerce_after_shop_loop_item', 'astra_woo_shop_thumbnail_wrap_end') !== false) {
117 remove_action('woocommerce_after_shop_loop_item', 'astra_woo_shop_thumbnail_wrap_end', 8);
118 }
119
120 if(has_action('woocommerce_shop_loop_item_title', 'astra_woo_shop_out_of_stock') !== false) {
121 remove_action('woocommerce_shop_loop_item_title', 'astra_woo_shop_out_of_stock', 8);
122 }
123
124 if(has_action('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart') === false) {
125 add_action('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10);
126 }
127
128 if(has_action('woocommerce_after_shop_loop_item', 'astra_woo_woocommerce_shop_product_content') !== false) {
129 remove_action('woocommerce_after_shop_loop_item', 'astra_woo_woocommerce_shop_product_content');
130 }
131
132 /**
133 * End of astra theme hook reverting
134 ******************************************************/
135
136 /*******************************************************
137 * Konsal theme hook reverting...
138 *
139 ******************************************************/
140
141 if(has_action('woocommerce_product_loop_start', 'konsal_woocommerce_product_loop_start') !== false) {
142 remove_action('woocommerce_product_loop_start', 'konsal_woocommerce_product_loop_start', 10);
143 }
144
145 if(has_action('woocommerce_product_loop_end', 'konsal_woocommerce_product_loop_end') !== false) {
146 remove_filter('woocommerce_product_loop_end', 'konsal_woocommerce_product_loop_end', 10);
147 }
148
149 if(has_action('woocommerce_short_description', 'woocommerce_new_short_description') !== false) {
150 remove_filter('woocommerce_short_description', 'woocommerce_new_short_description', 10);
151 }
152
153 $this->remove_action_if_exists('woocommerce_before_shop_loop_item', 'konsal_loop_product_thumbnail', 10);
154
155 /**
156 * End of Konsal theme hook reverting
157 ******************************************************/
158
159 /*******************************************************
160 * Hestia theme hook reverting...
161 *
162 ******************************************************/
163 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'hestia_woocommerce_template_loop_product_thumbnail', 10);
164 $this->remove_action_if_exists('woocommerce_before_shop_loop_item', 'hestia_woocommerce_before_shop_loop_item', 10);
165 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'hestia_woocommerce_after_shop_loop_item', 20);
166 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'hestia_woocommerce_template_loop_product_title', 10);
167
168
169 if(has_action('woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail') === false) {
170 add_action('woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10);
171 }
172
173 if(has_action('woocommerce_before_shop_loop_item', 'woocommerce_template_loop_product_link_open') === false) {
174 add_action('woocommerce_before_shop_loop_item', 'woocommerce_template_loop_product_link_open', 10);
175 }
176
177 if(has_action('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_product_link_close') === false) {
178 add_action('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_product_link_close', 5);
179 }
180
181 if(has_action('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart') === false) {
182 add_action('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10);
183 }
184
185 if(has_action('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title') === false) {
186 add_action('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 10);
187 }
188
189
190 if(has_action('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price') === false) {
191 add_action('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10);
192 }
193
194 /**
195 * End of hestia theme hook reverting
196 ******************************************************/
197
198
199 /*******************************************************
200 * Flatsome theme hook reverting...
201 *
202 ******************************************************/
203
204
205 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'flatsome_woocommerce_shop_loop_category', 0);
206 $this->remove_action_if_exists('woocommerce_before_shop_loop_item', 'woocommerce_show_product_loop_sale_flash');
207 $this->remove_action_if_exists('woocommerce_before_shop_loop', 'woocommerce_result_count');
208 $this->remove_action_if_exists('woocommerce_before_shop_loop', 'woocommerce_result_count', 20);
209
210 /**
211 * End of Flatsome theme hook reverting
212 ******************************************************/
213
214
215 /*******************************************************
216 * Neve theme hook reverting...
217 *
218 ******************************************************/
219
220
221 $this->remove_action_if_found_14('woocommerce_before_shop_loop_item', '\Neve\Views\Product_Layout', 'card_content_wrapper');
222 $this->remove_action_if_found_14('woocommerce_after_shop_loop_item', '\Neve\Views\Product_Layout', 'wrapper_close_div');
223 $this->remove_action_if_found_14('woocommerce_before_shop_loop_item_title', '\Neve\Views\Product_Layout', 'product_image_wrap');
224 $this->remove_action_if_found_14('woocommerce_before_shop_loop_item_title', '\Neve\Views\Product_Layout', 'out_of_stock_badge');
225 $this->remove_action_if_found_14('woocommerce_before_shop_loop_item_title', '\Neve\Views\Product_Layout', 'wrapper_close_div');
226
227
228 /**
229 * End of Neve theme hook reverting
230 ******************************************************/
231
232 /*******************************************************
233 * Kadence theme hook reverting in shop & archive
234 *
235 ******************************************************/
236
237 $this->remove_action_if_found_14('woocommerce_shop_loop_item_title', '\Kadence\Woocommerce\Component', 'archive_title_with_link');
238
239 /**
240 * End of Kadence theme hook reverting
241 ******************************************************/
242
243
244 /*******************************************************
245 * Woodmart theme hook reverting in shop & archive
246 *
247 ******************************************************/
248
249 $this->add_action_if_not_exists('woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail');
250 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'woodmart_template_loop_product_thumbnail');
251 $this->remove_action_if_exists('woocommerce_before_shop_loop', 'woodmart_products_per_page_select', 25);
252
253 /**
254 * End of Woodmart theme hook reverting in shop & archive
255 ******************************************************/
256
257
258 /*******************************************************
259 * OceanWP theme hook reverting...
260 *
261 ******************************************************/
262
263 $this->remove_action_if_found_14('woocommerce_before_shop_loop', '\OceanWP_WooCommerce_Config', 'add_shop_loop_div');
264 $this->remove_action_if_found_14('woocommerce_before_shop_loop', '\OceanWP_WooCommerce_Config', 'close_shop_loop_div', 40);
265 $this->remove_action_if_found_14('woocommerce_before_shop_loop', '\OceanWP_WooCommerce_Config', 'grid_list_buttons');
266 $this->remove_action_if_found_14('woocommerce_before_shop_loop', '\OceanWP_WooCommerce_Config', 'result_count', 31);
267
268 $this->add_action_if_not_exists('woocommerce_before_shop_loop', 'woocommerce_result_count');
269
270 $this->remove_action_if_found_14('woocommerce_before_shop_loop_item', '\OceanWP_WooCommerce_Config', 'add_shop_loop_item_inner_div');
271 $this->remove_action_if_found_14('woocommerce_after_shop_loop_item', '\OceanWP_WooCommerce_Config', 'close_shop_loop_item_inner_div');
272 $this->remove_action_if_found_14('woocommerce_before_shop_loop_item_title', '\OceanWP_WooCommerce_Config', 'loop_product_thumbnail');
273 $this->remove_action_if_found_14('woocommerce_after_shop_loop_item', '\OceanWP_WooCommerce_Config', 'archive_product_content');
274
275 /**
276 * End of OceanWP theme hook reverting
277 ******************************************************/
278
279
280 /*******************************************************
281 * Porto theme hook reverting...
282 *
283 ******************************************************/
284
285 if(has_action('woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail') !== false) {
286 remove_action('woocommerce_before_shop_loop_item_title', 'porto_loop_product_thumbnail', 10);
287 }
288
289 if(has_action('woocommerce_shop_loop_item_title', 'porto_woocommerce_shop_loop_item_title_open') !== false) {
290 remove_action('woocommerce_shop_loop_item_title', 'porto_woocommerce_shop_loop_item_title_open', 1);
291
292 }
293
294 if(has_action('woocommerce_shop_loop_item_title', 'porto_woocommerce_shop_loop_item_title_close') !== false) {
295 remove_action('woocommerce_shop_loop_item_title', 'porto_woocommerce_shop_loop_item_title_close', 100);
296 }
297
298 if(has_action('woocommerce_shop_loop_item_title', 'porto_woocommerce_shop_loop_item_title') !== false) {
299 remove_action('woocommerce_shop_loop_item_title', 'porto_woocommerce_shop_loop_item_title');
300 }
301
302 if(has_action('woocommerce_before_shop_loop', 'woocommerce_pagination') !== false) {
303 remove_action('woocommerce_before_shop_loop', 'woocommerce_pagination', 50);
304 }
305
306 if(has_action('woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail') === false) {
307 add_action('woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10);
308 }
309
310 $this->remove_action_if_exists( 'woocommerce_before_shop_loop', 'porto_grid_list_toggle', 70 );
311 /*******************************************************
312 * End of porto theme hook reverting...
313 *
314 ******************************************************/
315
316 /*******************************************************
317 * Electro theme hook reverting in shop & archive page
318 *
319 ******************************************************/
320
321
322 $this->remove_action_if_exists('woocommerce_before_shop_loop', 'electro_shop_control_bar', 11);
323 $this->remove_action_if_exists('woocommerce_loop_add_to_cart_link', 'electro_wrap_add_to_cart_link', 90);
324 $this->remove_action_if_exists('woocommerce_loop_add_to_cart_link', 'redux_apply_catalog_mode_for_product_loop', 85);
325
326 $this->remove_action_if_exists('electro_product_item_hover_area', 'electro_loop_action_buttons', 10);
327 $this->remove_action_if_exists('woocommerce_before_shop_loop_item', 'electro_wrap_product_outer', 0);
328 $this->remove_action_if_exists('woocommerce_before_shop_loop_item', 'electro_wrap_product_inner', 10);
329 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'electro_template_loop_header_open', 15);
330 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'electro_template_loop_categories', 20);
331 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_link_open', 25);
332 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 30);
333 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'electro_template_loop_product_thumbnail', 40);
334 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_link_close', 45);
335 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'electro_template_loop_header_close', 46);
336 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'electro_template_loop_body_open', 47);
337 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'electro_template_loop_categories', 50);
338 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_link_open', 55);
339 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 60);
340 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_template_loop_rating', 70);
341 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_template_loop_product_excerpt', 80);
342 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_template_loop_product_sku', 90);
343 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_product_link_close', 95);
344 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_template_loop_body_close', 96);
345 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_template_loop_footer_open', 98);
346 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_wrap_price_and_add_to_cart', 100);
347 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 110);
348 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_add_to_cart', 120);
349 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_wrap_price_and_add_to_cart_close', 130);
350 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'electro_template_loop_hover', 140);
351 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'electro_template_loop_footer_close', 145);
352 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'electro_wrap_product_inner_close', 150);
353 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'electro_wrap_product_outer_close', 160);
354 $this->remove_action_if_exists('woocommerce_before_shop_loop', 'electro_wc_loop_title', 10);
355 $this->remove_action_if_exists('woocommerce_get_price_html', 'electro_wrap_price_html', 90);
356 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 110);
357 $this->add_action_if_not_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10);
358
359 // Storefront Theme
360 $this->remove_action_if_exists('woocommerce_before_main_content', 'storefront_before_content', 10 );
361 $this->remove_action_if_exists('woocommerce_after_main_content', 'storefront_after_content', 10 );
362
363
364
365 /*******************************************************
366 * Woostify theme hook reverting in shop & archive page
367 *
368 ******************************************************/
369
370 // Remove Woostify WooCommerce scripts and filters
371 $this->remove_action_if_exists('loop_shop_columns', 'woostify_products_per_row');
372 $this->remove_action_if_exists('loop_shop_per_page', 'woostify_products_per_page');
373 $this->remove_action_if_exists('woocommerce_loop_add_to_cart_link', 'woostify_modify_woocommerce_loop_add_to_cart_link', 99);
374
375
376 // Remove Woostify before shop loop item title hooks
377 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'woostify_loop_product_wrapper_open', 10);
378 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'woostify_print_out_of_stock_label', 15);
379 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'woostify_loop_product_image_wrapper_open', 20);
380 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'woostify_change_sale_flash', 23);
381 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'woostify_product_loop_item_action', 25);
382 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'woostify_loop_product_link_open', 30);
383 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'woostify_loop_product_hover_image', 40);
384 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'woostify_loop_product_image', 50);
385 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'woostify_loop_product_link_close', 60);
386 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'woostify_loop_product_add_to_cart_on_image', 70);
387 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'woostify_product_loop_item_wishlist_icon_bottom', 80);
388 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'woostify_loop_product_image_wrapper_close', 90);
389 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'woostify_loop_product_content_open', 100);
390
391 // Remove Woostify shop loop item title hooks
392 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'woostify_add_template_loop_product_category', 5);
393 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'woostify_add_template_loop_product_title', 10);
394
395 // Remove Woostify after shop loop item title hooks
396 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'woostify_loop_product_rating', 2);
397 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'woostify_loop_product_meta_open', 5);
398 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'woostify_loop_product_price', 10);
399
400 // Remove Woostify after shop loop item hooks
401 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'woostify_loop_product_add_to_cart_button', 10);
402 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'woostify_loop_product_meta_close', 20);
403 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'woostify_loop_product_content_close', 50);
404 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'woostify_loop_product_wrapper_close', 100);
405
406 /**
407 * End of Woostify theme hook reverting
408 ******************************************************/
409 }
410
411 /**
412 * This method is called from badge module.
413 *
414 */
415 public function theme_conflicts__shop_and_archive_for_badge_module() {
416
417 $this->remove_action_if_exists( 'woocommerce_sale_flash', 'woodmart_product_label', 10 );
418 }
419
420 public function theme__conflicts__single_page() {
421
422 /**
423 * Woodmart theme dequeueing this so we are enqueueing again.
424 */
425 wp_enqueue_script('wc-flexslider');
426
427
428 /*******************************************************
429 * Woodmart theme hook reverting...
430 *
431 ******************************************************/
432
433 if(has_action('woocommerce_before_shop_loop_item_title', 'woodmart_template_loop_product_thumbnail') !== false) {
434 remove_action('woocommerce_before_shop_loop_item_title', 'woodmart_template_loop_product_thumbnail', 10);
435 }
436
437 if(has_action('woocommerce_sale_flash', 'woodmart_product_label') !== false) {
438 remove_filter('woocommerce_sale_flash', 'woodmart_product_label', 10);
439 }
440
441 $this->remove_action_if_exists( 'woocommerce_product_tabs', 'woodmart_custom_product_tabs' );
442 $this->add_action_if_not_exists('woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail');
443
444 /**
445 * End of Woodmart theme hook reverting
446 ******************************************************/
447 /*******************************************************
448 * Konsal theme hook reverting...
449 *
450 ******************************************************/
451
452 if(has_action('woocommerce_short_description', 'woocommerce_new_short_description') !== false) {
453 remove_filter('woocommerce_short_description', 'woocommerce_new_short_description', 10);
454 }
455
456 $this->remove_action_if_exists('woocommerce_before_shop_loop_item', 'konsal_loop_product_thumbnail', 10);
457
458 /**
459 * End of Konsal theme hook reverting
460 ******************************************************/
461
462 /*******************************************************
463 * Astra theme hook reverting...
464 *
465 ******************************************************/
466
467 if(has_action('woocommerce_before_shop_loop_item', 'astra_woo_shop_thumbnail_wrap_start') !== false) {
468 remove_action('woocommerce_before_shop_loop_item', 'astra_woo_shop_thumbnail_wrap_start', 6);
469 }
470
471 if(has_action('woocommerce_after_shop_loop_item', 'astra_woo_shop_thumbnail_wrap_end') !== false) {
472 remove_action('woocommerce_after_shop_loop_item', 'astra_woo_shop_thumbnail_wrap_end', 8);
473 }
474
475 if(has_action('woocommerce_after_shop_loop_item', 'astra_woo_woocommerce_shop_product_content') !== false) {
476 remove_action('woocommerce_after_shop_loop_item', 'astra_woo_woocommerce_shop_product_content');
477 }
478
479 if(has_action('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart') === false) {
480
481 add_action('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart');
482 }
483
484 if(has_action('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating') === false) {
485
486 add_action('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5);
487 }
488
489 if(has_action('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title') === false) {
490
491 add_action('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 10);
492 }
493
494 if(has_action('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price') === false) {
495
496 add_action('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10);
497 }
498
499 if(has_action('woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash') === false) {
500
501 add_action('woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 10);
502 }
503
504 if(has_action('woocommerce_before_shop_loop_item', 'woocommerce_show_product_loop_sale_flash') !== false) {
505
506 remove_action('woocommerce_before_shop_loop_item', 'woocommerce_show_product_loop_sale_flash', 9);
507 }
508
509 /**
510 * End of Astra theme hook reverting
511 ******************************************************/
512
513 /*******************************************************
514 * Electro theme hook reverting...
515 *
516 ******************************************************/
517
518 if(has_filter('woocommerce_sale_flash', 'electro_get_sale_flash') !== false) {
519 remove_filter('woocommerce_sale_flash', 'electro_get_sale_flash', 20);
520 }
521
522 if(has_filter('woocommerce_loop_add_to_cart_link', 'electro_wrap_add_to_cart_link') !== false) {
523 remove_filter('woocommerce_loop_add_to_cart_link', 'electro_wrap_add_to_cart_link', 90);
524 }
525
526 $this->add_action_if_not_exists('woocommerce_before_shop_loop_item', 'woocommerce_template_loop_product_link_open', 10);
527
528 $this->remove_action_if_exists('woocommerce_before_shop_loop_item', 'electro_wrap_product_inner');
529
530 $this->add_action_if_not_exists('woocommerce_before_shop_loop_item', 'woocommerce_template_loop_product_link_open', 10);
531 $this->add_action_if_not_exists('woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 10);
532 $this->add_action_if_not_exists('woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10);
533 $this->add_action_if_not_exists('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 10);
534 $this->add_action_if_not_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5);
535 $this->add_action_if_not_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10);
536 $this->add_action_if_not_exists('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_product_link_close', 5);
537 $this->add_action_if_not_exists('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10);
538
539 $this->remove_action_if_exists('electro_product_item_hover_area', 'electro_loop_action_buttons', 10);
540 $this->remove_action_if_exists('woocommerce_before_shop_loop_item', 'electro_wrap_product_outer', 0);
541 $this->remove_action_if_exists('woocommerce_before_shop_loop_item', 'electro_wrap_product_inner', 10);
542 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'electro_template_loop_header_open', 15);
543 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'electro_template_loop_categories', 20);
544 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_link_open', 25);
545 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 30);
546 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'electro_template_loop_product_thumbnail', 40);
547 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_link_close', 45);
548 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'electro_template_loop_header_close', 46);
549 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'electro_template_loop_body_open', 47);
550 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'electro_template_loop_categories', 50);
551 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_link_open', 55);
552 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 60);
553 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_template_loop_rating', 70);
554 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_template_loop_product_excerpt', 80);
555 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_template_loop_product_sku', 90);
556 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_product_link_close', 95);
557 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_template_loop_body_close', 96);
558 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_template_loop_footer_open', 98);
559 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_wrap_price_and_add_to_cart', 100);
560 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 110);
561 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_add_to_cart', 120);
562 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_wrap_price_and_add_to_cart_close', 130);
563 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'electro_template_loop_hover', 140);
564 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'electro_template_loop_footer_close', 145);
565 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'electro_wrap_product_inner_close', 150);
566 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'electro_wrap_product_outer_close', 160);
567 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'electro_wrap_product_outer_close', 160);
568 $this->remove_action_if_found_14('woocommerce_product_tabs', 'Electro_WooCommerce', 'modify_product_tabs');
569 /**
570 * End of Electro theme hook reverting
571 ******************************************************/
572
573
574 /*******************************************************
575 * flatsome theme hook reverting...
576 *
577 ******************************************************/
578
579 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'flatsome_woocommerce_shop_loop_category', 0);
580 $this->remove_action_if_exists('woocommerce_before_shop_loop_item', 'woocommerce_show_product_loop_sale_flash');
581
582 $this->add_action_if_not_exists('woocommerce_before_shop_loop_item', 'woocommerce_template_loop_product_link_open');
583 $this->add_action_if_not_exists('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_product_link_close');
584 $this->add_action_if_not_exists('woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash');
585
586
587 /**
588 * End of flatsome theme hook reverting
589 ******************************************************/
590
591
592 /*******************************************************
593 * Porto theme hook reverting...
594 *
595 ******************************************************/
596
597 if(has_action('woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail') !== false) {
598 remove_action('woocommerce_before_shop_loop_item_title', 'porto_loop_product_thumbnail', 10);
599 }
600
601 if(has_action('woocommerce_shop_loop_item_title', 'porto_woocommerce_shop_loop_item_title_open') !== false) {
602 remove_action('woocommerce_shop_loop_item_title', 'porto_woocommerce_shop_loop_item_title_open', 1);
603
604 }
605
606 if(has_action('woocommerce_shop_loop_item_title', 'porto_woocommerce_shop_loop_item_title_close') !== false) {
607 remove_action('woocommerce_shop_loop_item_title', 'porto_woocommerce_shop_loop_item_title_close', 100);
608 }
609
610 if(has_action('woocommerce_shop_loop_item_title', 'porto_woocommerce_shop_loop_item_title') !== false) {
611 remove_action('woocommerce_shop_loop_item_title', 'porto_woocommerce_shop_loop_item_title');
612 }
613
614 if(has_action('woocommerce_before_shop_loop', 'woocommerce_pagination') !== false) {
615 remove_action('woocommerce_before_shop_loop', 'woocommerce_pagination', 50);
616 }
617
618 if(has_action('woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail') === false) {
619 add_action('woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10);
620 }
621
622 $this->remove_action_if_exists( 'woocommerce_after_add_to_cart_button', 'porto_view_cart_after_add', 35 );
623 /**
624 * End of porto theme hook reverting
625 ******************************************************/
626
627
628 /*******************************************************
629 * Neve theme hook reverting...
630 *
631 ******************************************************/
632
633 $this->remove_action_if_found_14('woocommerce_before_shop_loop_item', '\Neve\Views\Product_Layout', 'card_content_wrapper');
634 $this->remove_action_if_found_14('woocommerce_after_shop_loop_item', '\Neve\Views\Product_Layout', 'wrapper_close_div');
635
636 $this->remove_action_if_found_14('woocommerce_before_shop_loop_item_title', '\Neve\Views\Product_Layout', 'product_image_wrap');
637 $this->remove_action_if_found_14('woocommerce_before_shop_loop_item_title', '\Neve\Views\Product_Layout', 'out_of_stock_badge');
638 $this->remove_action_if_found_14('woocommerce_before_shop_loop_item_title', '\Neve\Views\Product_Layout', 'wrapper_close_div');
639
640
641 /**
642 * End of Neve theme hook reverting
643 ******************************************************/
644
645
646 /*******************************************************
647 * xStore theme hook reverting...
648 *
649 ******************************************************/
650
651 if(has_filter('woocommerce_sale_flash', 'etheme_woocommerce_sale_flash') !== false) {
652 remove_filter('woocommerce_sale_flash', 'etheme_woocommerce_sale_flash', 20);
653 }
654
655 /**
656 * End of xStore theme hook reverting
657 ******************************************************/
658
659
660 /*******************************************************
661 * Storefront theme hook reverting...
662 *
663 ******************************************************/
664
665 $this->add_action_if_not_exists('woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 10);
666 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 6);
667
668 /**
669 * End of Storefront theme hook reverting
670 ******************************************************/
671
672
673 /*******************************************************
674 * Hestia theme hook reverting...
675 *
676 ******************************************************/
677
678 $this->add_action_if_not_exists('woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 10);
679 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 20);
680 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'hestia_woocommerce_template_loop_product_thumbnail', 10);
681 $this->remove_action_if_exists('woocommerce_before_shop_loop_item', 'hestia_woocommerce_before_shop_loop_item', 10);
682 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'hestia_woocommerce_after_shop_loop_item', 20);
683 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'hestia_woocommerce_template_loop_product_title', 10);
684 $this->add_action_if_not_exists('woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10);
685 $this->add_action_if_not_exists('woocommerce_before_shop_loop_item', 'woocommerce_template_loop_product_link_open', 10);
686 $this->add_action_if_not_exists('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_product_link_close', 5);
687 $this->add_action_if_not_exists('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10);
688 $this->add_action_if_not_exists('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 10);
689 $this->add_action_if_not_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5);
690 $this->add_action_if_not_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10);
691 $this->add_action_if_not_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10);
692
693 /**
694 * End of hestia theme hook reverting
695 ******************************************************/
696
697 /*******************************************************
698 * OceanWP theme hook reverting...
699 *
700 ******************************************************/
701
702 $this->remove_action_if_found_14('woocommerce_before_shop_loop_item_title', '\OceanWP_WooCommerce_Config', 'loop_product_thumbnail');
703 $this->remove_action_if_found_14('woocommerce_before_shop_loop_item', '\OceanWP_WooCommerce_Config', 'add_shop_loop_item_inner_div');
704 $this->remove_action_if_found_14('woocommerce_after_shop_loop_item', '\OceanWP_WooCommerce_Config', 'archive_product_content');
705 $this->remove_action_if_found_14('woocommerce_after_shop_loop_item', '\OceanWP_WooCommerce_Config', 'close_shop_loop_item_inner_div');
706
707 /**
708 * End of hestia theme hook reverting
709 ******************************************************/
710
711 /*******************************************************
712 * Porto theme hook reverting
713 ******************************************************/
714 $this->remove_action_if_exists('woocommerce_after_single_product_summary', 'porto_woocommerce_output_related_products', 20);
715 $this->remove_action_if_exists('porto_after_content_bottom', 'porto_woocommerce_output_related_products', 8);
716 /**
717 * End of Porto theme hook reverting
718 ******************************************************/
719
720 /*******************************************************
721 * Astra theme hook reverting
722 ******************************************************/
723 $this->remove_action_if_found_14('woocommerce_product_get_rating_html', '\Astra_Woocommerce', 'rating_markup');
724 $this->add_action_if_not_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5);
725 /**
726 * End of Astra theme hook reverting
727 ******************************************************/
728 }
729
730 public function theme_conflicts_in_editor__product_tabs_widget() {
731
732 // Electro Theme
733 $this->remove_action_if_found_14('woocommerce_product_tabs', 'Electro_WooCommerce', 'modify_product_tabs');
734 }
735
736
737 public function theme_conflicts_cart_page() {
738 // common
739 $this->add_action_if_not_exists('woocommerce_before_shop_loop_item', 'woocommerce_template_loop_product_link_open', 10);
740 $this->add_action_if_not_exists('woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10);
741 $this->add_action_if_not_exists('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 10);
742 $this->add_action_if_not_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10);
743 $this->add_action_if_not_exists('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10);
744
745 /*******************************************************
746 * OceanWP theme cart page hook for cross-sell reverting...
747 *
748 ******************************************************/
749
750 $this->remove_action_if_found_14('ocean_after_product_entry_slider', '\OceanWP_WooCommerce_Config', 'quick_view_button');
751 $this->remove_action_if_found_14('ocean_after_product_entry_image', '\OceanWP_WooCommerce_Config', 'quick_view_button');
752 $this->remove_action_if_found_14('woocommerce_before_shop_loop_item_title', '\OceanWP_WooCommerce_Config', 'loop_product_thumbnail');
753 $this->remove_action_if_found_14('woocommerce_after_shop_loop_item', '\OceanWP_WooCommerce_Config', 'archive_product_content');
754 $this->remove_action_if_found_14('woocommerce_before_shop_loop_item', '\OceanWP_WooCommerce_Config', 'add_shop_loop_item_inner_div');
755 $this->remove_action_if_found_14('woocommerce_after_shop_loop_item', '\OceanWP_WooCommerce_Config', 'close_shop_loop_item_inner_div');
756
757
758 /**
759 * End of OceanWP theme hook reverting
760 ******************************************************/
761
762 /*******************************************************
763 * Astra theme cart page hook for cross-sell reverting...
764 *******************************************************/
765
766 $this->remove_action_if_exists('woocommerce_before_shop_loop_item', 'astra_woo_shop_thumbnail_wrap_start', 6);
767 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'astra_woo_shop_thumbnail_wrap_end', 8);
768 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'astra_woo_woocommerce_shop_product_content');
769 $this->add_action_if_not_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5 );
770 $this->remove_action_if_found_14('woocommerce_product_get_rating_html', '\Astra_Woocommerce', 'rating_markup' );
771 /**
772 * End of Astra theme hook reverting
773 ******************************************************/
774
775 /*******************************************************
776 * Hestia theme cart page hook for cross-sell reverting...
777 *******************************************************/
778
779 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'hestia_woocommerce_template_loop_product_thumbnail', 10);
780 $this->remove_action_if_exists('woocommerce_before_shop_loop_item', 'hestia_woocommerce_before_shop_loop_item', 10);
781 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'hestia_woocommerce_after_shop_loop_item', 20);
782 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'hestia_woocommerce_template_loop_product_title', 10);
783
784 /**
785 * End of Hestia theme hook reverting
786 ******************************************************/
787
788 /*******************************************************
789 * Porto theme cart page hook for cross-sell reverting...
790 *
791 ******************************************************/
792
793 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'porto_loop_product_thumbnail', 10);
794 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'porto_woocommerce_shop_loop_item_title_open', 1);
795 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'porto_woocommerce_shop_loop_item_title_close', 100);
796 $this->remove_action_if_exists( 'woocommerce_shop_loop_item_title', 'porto_woocommerce_shop_loop_item_title');
797
798 /**
799 * End of Porto theme hook reverting
800 ******************************************************/
801
802 /*******************************************************
803 * Woodmart theme cart page hook for cross-sell reverting...
804 *******************************************************/
805
806 $this->remove_action_if_exists( 'woocommerce_before_shop_loop_item_title', 'woodmart_template_loop_product_thumbnail', 10);
807
808 /**
809 * End of Woodmart theme hook reverting
810 ******************************************************/
811
812 /*******************************************************
813 * Flatsome theme hook reverting
814 ******************************************************/
815 $this->add_action_if_not_exists( 'woocommerce_cart_collaterals', 'woocommerce_cross_sell_display' );
816 $this->remove_action_if_exists( 'woocommerce_after_cart_table', 'woocommerce_cross_sell_display' );
817 /**
818 * End of Flatsome theme hook reverting
819 ******************************************************/
820 }
821
822 public function theme_conflicts_empty_cart_page() {
823
824 $this->remove_action_if_exists('woocommerce_cart_is_empty', 'woodmart_wc_empty_cart_message', 10);
825 $this->remove_action_if_exists('woocommerce_cart_is_empty', 'woodmart_empty_cart_text', 20);
826 $this->add_action_if_not_exists('woocommerce_cart_is_empty', 'wc_empty_cart_message', 10);
827
828 add_filter('woocommerce_cart_product_cannot_be_purchased_message', function () {
829 return;
830 }, 10);
831 }
832
833
834 public function theme_conflicts_in_elementor_editor_cross_sells() {
835
836 /*******************************************************
837 * OceanWP theme cart page hook for cross-sell reverting..
838 ******************************************************/
839
840 $this->add_action_if_not_exists('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10);
841 $this->add_action_if_not_exists('woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15);
842
843 $this->remove_action_if_found_14('woocommerce_before_shop_loop_item', '\OceanWP_WooCommerce_Config', 'add_shop_loop_item_inner_div');
844
845 $this->remove_action_if_found_14('woocommerce_before_shop_loop_item_title', '\OceanWP_WooCommerce_Config', 'loop_product_thumbnail');
846
847 $this->remove_action_if_found_14('woocommerce_cart_collaterals', '\OceanWP_WooCommerce_Config', 'cross_sell_display');
848 $this->remove_action_if_found_14('woocommerce_after_single_product_summary', '\OceanWP_WooCommerce_Config', 'upsell_display');
849 $this->remove_action_if_found_14('ocean_after_product_entry_image', '\OceanWP_WooCommerce_Config', 'quick_view_button');
850 $this->remove_action_if_found_14('ocean_after_product_entry_slider', '\OceanWP_WooCommerce_Config', 'quick_view_button');
851
852 $this->remove_action_if_found_14('woocommerce_after_shop_loop_item', '\OceanWP_WooCommerce_Config', 'archive_product_content');
853 $this->remove_action_if_found_14('woocommerce_after_shop_loop_item', '\OceanWP_WooCommerce_Config', 'close_shop_loop_item_inner_div');
854 $this->remove_action_if_found_14('woocommerce_before_template_part', '\OceanWP_WooCommerce_Config', 'before_template_part');
855 $this->add_action_if_not_exists('woocommerce_cart_collaterals', 'woocommerce_cross_sell_display');
856 $this->add_action_if_not_exists('woocommerce_before_shop_loop_item', 'woocommerce_template_loop_product_link_open', 10);
857 $this->add_action_if_not_exists('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_product_link_close', 5);
858 $this->add_action_if_not_exists('woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 10);
859 $this->add_action_if_not_exists('woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10);
860 $this->add_action_if_not_exists('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 10);
861 $this->add_action_if_not_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5);
862 $this->add_action_if_not_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10);
863 $this->add_action_if_not_exists('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10);
864
865 /**
866 * End of OceanWP theme hook reverting
867 ******************************************************/
868
869
870
871 /*******************************************************
872 * Porto theme cart page hook for cross-sell reverting...
873 *
874 ******************************************************/
875
876 $this->remove_action_if_exists( 'woocommerce_before_shop_loop_item_title', 'porto_loop_product_thumbnail', 10 );
877 $this->remove_action_if_exists( 'woocommerce_shop_loop_item_title', 'porto_woocommerce_shop_loop_item_title_open', 1 );
878 $this->remove_action_if_exists( 'woocommerce_shop_loop_item_title', 'porto_woocommerce_shop_loop_item_title_close', 100 );
879 $this->remove_action_if_exists( 'woocommerce_shop_loop_item_title', 'porto_woocommerce_shop_loop_item_title' );
880 $this->remove_action_if_exists( 'woocommerce_before_shop_loop', 'woocommerce_pagination', 50 );
881 $this->add_action_if_not_exists( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10 );
882
883 /**
884 * End of Porto theme hook reverting
885 ******************************************************/
886
887 /*******************************************************
888 * Woodmart theme cart page hook for cross-sell reverting...
889 *******************************************************/
890
891 $this->remove_action_if_exists( 'woocommerce_before_shop_loop_item_title', 'woodmart_template_loop_product_thumbnail', 10 );
892
893 /**
894 * End of Woodmart theme hook reverting
895 ******************************************************/
896
897 /*******************************************************
898 * Astra theme hook reverting
899 ******************************************************/
900 $this->remove_action_if_found_14( 'woocommerce_product_get_rating_html', '\Astra_Woocommerce', 'rating_markup' );
901 $this->add_action_if_not_exists( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5 );
902 /**
903 * End of Astra theme hook reverting
904 ******************************************************/
905
906 /*******************************************************
907 * Flatsome theme hook reverting
908 ******************************************************/
909 $this->add_action_if_not_exists( 'woocommerce_cart_collaterals', 'woocommerce_cross_sell_display' );
910 $this->remove_action_if_exists( 'woocommerce_after_cart_table', 'woocommerce_cross_sell_display' );
911 /**
912 * End of Flatsome theme hook reverting
913 ******************************************************/
914
915 /*******************************************************
916 * Electro theme hook reverting
917 ******************************************************/
918 $this->remove_action_if_exists('electro_product_item_hover_area', 'electro_loop_action_buttons', 10);
919
920 $this->remove_action_if_exists('woocommerce_before_shop_loop_item', 'electro_wrap_product_outer', 0);
921 $this->remove_action_if_exists('woocommerce_before_shop_loop_item', 'electro_wrap_product_inner', 10);
922
923 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'electro_template_loop_header_open', 15);
924 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'electro_template_loop_categories', 20);
925
926 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_link_open', 25);
927 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 30);
928 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'electro_template_loop_product_thumbnail', 40);
929 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_link_close', 45);
930 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'electro_template_loop_header_close', 46);
931
932 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'electro_template_loop_body_open', 47);
933 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'electro_template_loop_categories', 50);
934 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_link_open', 55);
935 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 60);
936
937 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_template_loop_rating', 70);
938 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_template_loop_product_excerpt', 80);
939 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_template_loop_product_sku', 90);
940 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_product_link_close', 95);
941 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_template_loop_body_close', 96);
942
943 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_template_loop_footer_open', 98);
944 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_wrap_price_and_add_to_cart', 100);
945 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 110);
946 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_add_to_cart', 120);
947 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_wrap_price_and_add_to_cart_close', 130);
948
949 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'electro_template_loop_hover', 140);
950 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'electro_template_loop_footer_close', 145);
951 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'electro_wrap_product_inner_close', 150);
952 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'electro_wrap_product_outer_close', 160);
953
954 $this->remove_action_if_exists('woocommerce_loop_add_to_cart_link', 'electro_wrap_add_to_cart_link', 90);
955 $this->remove_action_if_exists('woocommerce_get_price_html', 'electro_wrap_price_html', 90);
956 /**
957 * Electro of Neve theme hook reverting
958 ******************************************************/
959 }
960
961 public function theme_conflicts_in_elementor_editor_up_sells() {
962
963 /*******************************************************
964 * OceanWP theme cart page hook for cross-sell reverting..
965 ******************************************************/
966
967 $this->add_action_if_not_exists('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10);
968 $this->add_action_if_not_exists('woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15);
969
970 $this->remove_action_if_found_14('woocommerce_before_shop_loop_item', '\OceanWP_WooCommerce_Config', 'add_shop_loop_item_inner_div');
971
972 $this->remove_action_if_found_14('woocommerce_before_shop_loop_item_title', '\OceanWP_WooCommerce_Config', 'loop_product_thumbnail');
973
974 $this->remove_action_if_found_14('woocommerce_cart_collaterals', '\OceanWP_WooCommerce_Config', 'cross_sell_display');
975 $this->remove_action_if_found_14('woocommerce_after_single_product_summary', '\OceanWP_WooCommerce_Config', 'upsell_display');
976 $this->remove_action_if_found_14('ocean_after_product_entry_image', '\OceanWP_WooCommerce_Config', 'quick_view_button');
977 $this->remove_action_if_found_14('ocean_after_product_entry_slider', '\OceanWP_WooCommerce_Config', 'quick_view_button');
978
979 $this->remove_action_if_found_14('woocommerce_after_shop_loop_item', '\OceanWP_WooCommerce_Config', 'archive_product_content');
980 $this->remove_action_if_found_14('woocommerce_after_shop_loop_item', '\OceanWP_WooCommerce_Config', 'close_shop_loop_item_inner_div');
981 $this->remove_action_if_found_14('woocommerce_before_template_part', '\OceanWP_WooCommerce_Config', 'before_template_part');
982 $this->add_action_if_not_exists('woocommerce_cart_collaterals', 'woocommerce_cross_sell_display');
983 $this->add_action_if_not_exists('woocommerce_before_shop_loop_item', 'woocommerce_template_loop_product_link_open', 10);
984 $this->add_action_if_not_exists('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_product_link_close', 5);
985 $this->add_action_if_not_exists('woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 10);
986 $this->add_action_if_not_exists('woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10);
987 $this->add_action_if_not_exists('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 10);
988 $this->add_action_if_not_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5);
989 $this->add_action_if_not_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10);
990 $this->add_action_if_not_exists('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10);
991
992 /**
993 * End of OceanWP theme hook reverting
994 ******************************************************/
995
996
997 /*******************************************************
998 * Porto theme cart page hook for cross-sell reverting...
999 *
1000 ******************************************************/
1001
1002 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'porto_loop_product_thumbnail', 10) ;
1003 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'porto_woocommerce_shop_loop_item_title_open', 1);
1004 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'porto_woocommerce_shop_loop_item_title_close', 100);
1005 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'porto_woocommerce_shop_loop_item_title');
1006 $this->remove_action_if_exists('woocommerce_before_shop_loop', 'woocommerce_pagination', 50);
1007 $this->add_action_if_not_exists('woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10);
1008
1009 /**
1010 * End of Porto theme hook reverting
1011 ******************************************************/
1012
1013 /*******************************************************
1014 * Woodmart theme cart page hook for cross-sell reverting...
1015 *******************************************************/
1016
1017 $this->remove_action_if_exists( 'woocommerce_before_shop_loop_item_title', 'woodmart_template_loop_product_thumbnail', 10 );
1018
1019 /**
1020 * End of Woodmart theme hook reverting
1021 ******************************************************/
1022
1023 /*******************************************************
1024 * Electro theme hook reverting
1025 ******************************************************/
1026 $this->remove_action_if_exists('electro_product_item_hover_area', 'electro_loop_action_buttons', 10);
1027
1028 $this->remove_action_if_exists('woocommerce_before_shop_loop_item', 'electro_wrap_product_outer', 0);
1029 $this->remove_action_if_exists('woocommerce_before_shop_loop_item', 'electro_wrap_product_inner', 10);
1030
1031 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'electro_template_loop_header_open', 15);
1032 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'electro_template_loop_categories', 20);
1033
1034 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_link_open', 25);
1035 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 30);
1036 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'electro_template_loop_product_thumbnail', 40);
1037 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_link_close', 45);
1038 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'electro_template_loop_header_close', 46);
1039
1040 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'electro_template_loop_body_open', 47);
1041 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'electro_template_loop_categories', 50);
1042 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_link_open', 55);
1043 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 60);
1044
1045 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_template_loop_rating', 70);
1046 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_template_loop_product_excerpt', 80);
1047 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_template_loop_product_sku', 90);
1048 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_product_link_close', 95);
1049 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_template_loop_body_close', 96);
1050
1051 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_template_loop_footer_open', 98);
1052 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_wrap_price_and_add_to_cart', 100);
1053 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 110);
1054 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_add_to_cart', 120);
1055 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_wrap_price_and_add_to_cart_close', 130);
1056
1057 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'electro_template_loop_hover', 140);
1058 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'electro_template_loop_footer_close', 145);
1059 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'electro_wrap_product_inner_close', 150);
1060 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'electro_wrap_product_outer_close', 160);
1061
1062 $this->remove_action_if_exists('woocommerce_loop_add_to_cart_link', 'electro_wrap_add_to_cart_link', 90);
1063 $this->remove_action_if_exists('woocommerce_get_price_html', 'electro_wrap_price_html', 90);
1064 /**
1065 * Electro of Neve theme hook reverting
1066 ******************************************************/
1067 }
1068
1069 public function theme_conflicts_in_elementor_editor_related_products() {
1070
1071 /*******************************************************
1072 * OceanWP theme cart page hook for cross-sell reverting..
1073 ******************************************************/
1074
1075 $this->add_action_if_not_exists('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10);
1076 $this->add_action_if_not_exists('woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15);
1077
1078 $this->remove_action_if_found_14('woocommerce_before_shop_loop_item', '\OceanWP_WooCommerce_Config', 'add_shop_loop_item_inner_div');
1079
1080 $this->remove_action_if_found_14('woocommerce_before_shop_loop_item_title', '\OceanWP_WooCommerce_Config', 'loop_product_thumbnail');
1081
1082 $this->remove_action_if_found_14('woocommerce_cart_collaterals', '\OceanWP_WooCommerce_Config', 'cross_sell_display');
1083 $this->remove_action_if_found_14('woocommerce_after_single_product_summary', '\OceanWP_WooCommerce_Config', 'upsell_display');
1084 $this->remove_action_if_found_14('ocean_after_product_entry_image', '\OceanWP_WooCommerce_Config', 'quick_view_button');
1085 $this->remove_action_if_found_14('ocean_after_product_entry_slider', '\OceanWP_WooCommerce_Config', 'quick_view_button');
1086
1087 $this->remove_action_if_found_14('woocommerce_after_shop_loop_item', '\OceanWP_WooCommerce_Config', 'archive_product_content');
1088 $this->remove_action_if_found_14('woocommerce_after_shop_loop_item', '\OceanWP_WooCommerce_Config', 'close_shop_loop_item_inner_div');
1089 $this->remove_action_if_found_14('woocommerce_before_template_part', '\OceanWP_WooCommerce_Config', 'before_template_part');
1090 $this->add_action_if_not_exists('woocommerce_cart_collaterals', 'woocommerce_cross_sell_display');
1091 $this->add_action_if_not_exists('woocommerce_before_shop_loop_item', 'woocommerce_template_loop_product_link_open', 10);
1092 $this->add_action_if_not_exists('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_product_link_close', 5);
1093 $this->add_action_if_not_exists('woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 10);
1094 $this->add_action_if_not_exists('woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10);
1095 $this->add_action_if_not_exists('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 10);
1096 $this->add_action_if_not_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5);
1097 $this->add_action_if_not_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10);
1098 $this->add_action_if_not_exists('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10);
1099
1100 /**
1101 * End of OceanWP theme hook reverting
1102 ******************************************************/
1103
1104
1105
1106 /*******************************************************
1107 * Porto theme cart page hook for cross-sell reverting...
1108 *
1109 ******************************************************/
1110
1111 $this->remove_action_if_exists( 'woocommerce_before_shop_loop_item_title', 'porto_loop_product_thumbnail', 10 );
1112 $this->remove_action_if_exists( 'woocommerce_shop_loop_item_title', 'porto_woocommerce_shop_loop_item_title_open', 1 );
1113 $this->remove_action_if_exists( 'woocommerce_shop_loop_item_title', 'porto_woocommerce_shop_loop_item_title_close', 100 );
1114 $this->remove_action_if_exists( 'woocommerce_shop_loop_item_title', 'porto_woocommerce_shop_loop_item_title' );
1115 $this->remove_action_if_exists( 'woocommerce_before_shop_loop', 'woocommerce_pagination', 50 );
1116 $this->add_action_if_not_exists( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10 );
1117
1118 /**
1119 * End of Porto theme hook reverting
1120 ******************************************************/
1121
1122 /*******************************************************
1123 * Woodmart theme cart page hook for cross-sell reverting...
1124 *******************************************************/
1125
1126 $this->remove_action_if_exists( 'woocommerce_before_shop_loop_item_title', 'woodmart_template_loop_product_thumbnail', 10 );
1127
1128 /**
1129 * End of Woodmart theme hook reverting
1130 ******************************************************/
1131
1132 /*******************************************************
1133 * Astra theme hook reverting
1134 ******************************************************/
1135 $this->remove_action_if_found_14( 'woocommerce_product_get_rating_html', '\Astra_Woocommerce', 'rating_markup' );
1136 $this->add_action_if_not_exists( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5 );
1137 /**
1138 * End of Astra theme hook reverting
1139 ******************************************************/
1140
1141 /*******************************************************
1142 * Neve theme hook reverting
1143 ******************************************************/
1144 $this->remove_action_if_found_14( 'woocommerce_before_shop_loop_item','\Neve\Views\Product_Layout', 'card_content_wrapper' );
1145 $this->remove_action_if_found_14( 'woocommerce_before_shop_loop_item_title','\Neve\Views\Product_Layout', 'product_image_wrap' );
1146 $this->remove_action_if_found_14( 'woocommerce_before_shop_loop_item','\Neve\Views\Product_Layout', 'card_content_wrapper', 1);
1147 $this->remove_action_if_found_14( 'woocommerce_after_shop_loop_item','\Neve\Views\Product_Layout', 'wrapper_close_div', 100);
1148 $this->remove_action_if_found_14( 'woocommerce_before_shop_loop_item_title','\Neve\Views\Product_Layout', 'out_of_stock_badge' );
1149 $this->remove_action_if_found_14( 'woocommerce_before_shop_loop_item_title','\Neve\Views\Product_Layout', 'wrapper_close_div' );
1150 /**
1151 * End of Neve theme hook reverting
1152 ******************************************************/
1153
1154 /*******************************************************
1155 * Electro theme hook reverting
1156 ******************************************************/
1157 $this->remove_action_if_exists('electro_product_item_hover_area', 'electro_loop_action_buttons', 10);
1158
1159 $this->remove_action_if_exists('woocommerce_before_shop_loop_item', 'electro_wrap_product_outer', 0);
1160 $this->remove_action_if_exists('woocommerce_before_shop_loop_item', 'electro_wrap_product_inner', 10);
1161
1162 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'electro_template_loop_header_open', 15);
1163 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'electro_template_loop_categories', 20);
1164
1165 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_link_open', 25);
1166 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 30);
1167 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'electro_template_loop_product_thumbnail', 40);
1168 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_link_close', 45);
1169 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'electro_template_loop_header_close', 46);
1170
1171 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'electro_template_loop_body_open', 47);
1172 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'electro_template_loop_categories', 50);
1173 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_link_open', 55);
1174 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 60);
1175
1176 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_template_loop_rating', 70);
1177 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_template_loop_product_excerpt', 80);
1178 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_template_loop_product_sku', 90);
1179 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_product_link_close', 95);
1180 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_template_loop_body_close', 96);
1181
1182 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_template_loop_footer_open', 98);
1183 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_wrap_price_and_add_to_cart', 100);
1184 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 110);
1185 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_add_to_cart', 120);
1186 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_wrap_price_and_add_to_cart_close', 130);
1187
1188 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'electro_template_loop_hover', 140);
1189 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'electro_template_loop_footer_close', 145);
1190 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'electro_wrap_product_inner_close', 150);
1191 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'electro_wrap_product_outer_close', 160);
1192
1193 $this->remove_action_if_exists('woocommerce_loop_add_to_cart_link', 'electro_wrap_add_to_cart_link', 90);
1194 $this->remove_action_if_exists('woocommerce_get_price_html', 'electro_wrap_price_html', 90);
1195 /**
1196 * Electro of Neve theme hook reverting
1197 ******************************************************/
1198 }
1199
1200
1201 public function theme_conflicts_my_account_page() {
1202
1203 $this->remove_action_if_exists('woocommerce_account_dashboard', 'woodmart_my_account_links');
1204 $this->remove_action_if_exists('woocommerce_account_dashboard', 'flatsome_my_account_dashboard');
1205 }
1206
1207
1208 public function theme_conflicts__archive_products_widget_during_render() {
1209
1210 $this->remove_action_if_exists('woocommerce_shop_loop', 'electro_shop_loop');
1211
1212 $this->remove_action_if_exists( 'woocommerce_shop_loop_item_title', 'porto_woocommerce_shop_loop_item_title_open', 1 );
1213 $this->remove_action_if_exists( 'woocommerce_shop_loop_item_title', 'porto_woocommerce_shop_loop_item_title_close', 100 );
1214 }
1215
1216
1217 public function theme_conflicts_in_specific_footer_area() {
1218
1219 $this->remove_action_if_found_14('wp_footer', '\OceanWP_WooCommerce_Config', 'get_mini_cart_sidebar');
1220 }
1221
1222
1223 public function theme_conflicts_archive_page_after_wp_loaded() {
1224
1225 /**
1226 * Neve theme
1227 */
1228 $this->remove_action_if_exists('neve_bc_count', 'woocommerce_result_count');
1229 $this->remove_action_if_exists('nv_woo_header_bits', 'woocommerce_catalog_ordering', 30);
1230 $this->remove_action_if_exists('neve_bc_count', 'woocommerce_breadcrumb');
1231
1232 /**
1233 * Hestia theme
1234 */
1235 $this->remove_action_if_exists('woocommerce_before_main_content', 'hestia_woocommerce_before_main_content', 10);
1236 $this->remove_action_if_exists('woocommerce_after_main_content', 'hestia_woocommerce_after_main_content', 9);
1237
1238
1239 /**
1240 * flatsome header hooks reverting to remove the woocommerce default sorting
1241 */
1242 $this->remove_action_if_exists('flatsome_breadcrumb', 'woocommerce_breadcrumb', 20);
1243 $this->remove_action_if_exists('flatsome_after_header', 'flatsome_category_header');
1244
1245 /**
1246 * Electro theme
1247 */
1248 //$this->remove_action_if_exists('woocommerce_shop_loop', 'electro_shop_loop', 10);
1249 }
1250
1251
1252 public function theme_conflicts_in_editor__archive_products_widget() {
1253
1254 /**
1255 * Storefront theme
1256 */
1257 $this->remove_action_if_exists('woocommerce_before_shop_loop', 'storefront_sorting_wrapper', 9);
1258 $this->remove_action_if_exists('woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 10);
1259 $this->remove_action_if_exists('woocommerce_before_shop_loop', 'woocommerce_result_count', 20);
1260 $this->remove_action_if_exists('woocommerce_before_shop_loop', 'storefront_woocommerce_pagination', 30);
1261 $this->remove_action_if_exists('woocommerce_before_shop_loop', 'storefront_sorting_wrapper_close', 31);
1262
1263 /**
1264 * Porto Theme
1265 */
1266 $this->remove_action_if_exists('woocommerce_before_shop_loop', 'porto_woocommerce_open_before_clearfix_div', 11);
1267 $this->remove_action_if_exists('woocommerce_before_shop_loop', 'porto_woocommerce_close_before_clearfix_div', 80);
1268 $this->remove_action_if_exists('woocommerce_after_shop_loop', 'porto_woocommerce_open_after_clearfix_div', 1);
1269 $this->remove_action_if_exists('woocommerce_after_shop_loop', 'porto_woocommerce_close_after_clearfix_div', 999);
1270 $this->remove_action_if_exists('woocommerce_before_shop_loop', 'porto_grid_list_toggle', 70);
1271 $this->remove_action_if_exists('woocommerce_before_shop_loop', 'woocommerce_pagination', 50);
1272 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'porto_loop_product_thumbnail', 10);
1273 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'porto_woocommerce_shop_loop_item_title');
1274 $this->add_action_if_not_exists('woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail');
1275 $this->add_action_if_not_exists('woocommerce_before_shop_loop_item', 'woocommerce_template_loop_product_link_open');
1276 $this->add_action_if_not_exists('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_product_link_close');
1277
1278 /**
1279 * xstore theme
1280 */
1281 $this->remove_action_if_exists('woocommerce_sale_flash', 'etheme_woocommerce_sale_flash', 20);
1282 $this->remove_action_if_exists('woocommerce_before_shop_loop', 'etheme_grid_list_switcher', 35);
1283 $this->remove_action_if_exists('woocommerce_before_shop_loop', 'etheme_products_per_page_select', 37);
1284
1285
1286 /**
1287 * oceanwp theme
1288 */
1289 $this->remove_action_if_found_14('woocommerce_before_shop_loop', '\OceanWP_WooCommerce_Config', 'add_shop_loop_div');
1290 $this->remove_action_if_found_14('woocommerce_before_shop_loop', '\OceanWP_WooCommerce_Config', 'close_shop_loop_div',40);
1291 $this->remove_action_if_found_14('woocommerce_before_template_part', '\OceanWP_WooCommerce_Config', 'before_template_part');
1292 $this->remove_action_if_found_14('woocommerce_before_shop_loop', '\OceanWP_WooCommerce_Config', 'grid_list_buttons');
1293 $this->remove_action_if_found_14('woocommerce_before_shop_loop', '\OceanWP_WooCommerce_Config', 'result_count',31);
1294 $this->remove_action_if_found_14('woocommerce_before_shop_loop_item', '\OceanWP_WooCommerce_Config', 'add_shop_loop_item_inner_div');
1295 $this->remove_action_if_found_14('woocommerce_after_shop_loop_item', '\OceanWP_WooCommerce_Config', 'close_shop_loop_item_inner_div');
1296 $this->remove_action_if_found_14('woocommerce_before_shop_loop_item_title', '\OceanWP_WooCommerce_Config', 'loop_product_thumbnail');
1297 $this->remove_action_if_found_14('woocommerce_after_shop_loop_item', '\OceanWP_WooCommerce_Config', 'archive_product_content');
1298
1299 $this->add_action_if_not_exists('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 10);
1300 $this->add_action_if_not_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5);
1301 $this->add_action_if_not_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10);
1302 $this->add_action_if_not_exists('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10);
1303
1304 /**
1305 * woodmart theme
1306 */
1307 $this->remove_action_if_exists('woocommerce_before_shop_loop', 'woodmart_show_sidebar_btn', 25);
1308 $this->remove_action_if_exists('woocommerce_before_shop_loop', 'woodmart_products_per_page_select', 25);
1309 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'woodmart_template_loop_product_thumbnail', 10);
1310
1311 /**
1312 * Kadence theme
1313 */
1314 $this->remove_action_if_found_14('woocommerce_shop_loop_item_title', '\Kadence\Woocommerce\Component', 'archive_title_with_link');
1315
1316 /**
1317 * Electro theme
1318 */
1319 $this->remove_action_if_exists('woocommerce_before_shop_loop', 'electro_shop_control_bar', 11);
1320 $this->remove_action_if_exists('woocommerce_loop_add_to_cart_link', 'electro_wrap_add_to_cart_link', 90);
1321 $this->remove_action_if_exists('woocommerce_loop_add_to_cart_link', 'redux_apply_catalog_mode_for_product_loop', 85);
1322
1323 $this->remove_action_if_exists('electro_product_item_hover_area', 'electro_loop_action_buttons', 10);
1324 $this->remove_action_if_exists('woocommerce_before_shop_loop_item', 'electro_wrap_product_outer', 0);
1325 $this->remove_action_if_exists('woocommerce_before_shop_loop_item', 'electro_wrap_product_inner', 10);
1326 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'electro_template_loop_header_open', 15);
1327 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'electro_template_loop_categories', 20);
1328 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_link_open', 25);
1329 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 30);
1330 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'electro_template_loop_product_thumbnail', 40);
1331 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_link_close', 45);
1332 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'electro_template_loop_header_close', 46);
1333 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'electro_template_loop_body_open', 47);
1334 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'electro_template_loop_categories', 50);
1335 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_link_open', 55);
1336 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 60);
1337 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_template_loop_rating', 70);
1338 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_template_loop_product_excerpt', 80);
1339 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_template_loop_product_sku', 90);
1340 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_product_link_close', 95);
1341 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_template_loop_body_close', 96);
1342 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_template_loop_footer_open', 98);
1343 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_wrap_price_and_add_to_cart', 100);
1344 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 110);
1345 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_add_to_cart', 120);
1346 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'electro_wrap_price_and_add_to_cart_close', 130);
1347 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'electro_template_loop_hover', 140);
1348 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'electro_template_loop_footer_close', 145);
1349 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'electro_wrap_product_inner_close', 150);
1350 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'electro_wrap_product_outer_close', 160);
1351 $this->remove_action_if_exists('woocommerce_before_shop_loop', 'electro_wc_loop_title', 10);
1352
1353 /**
1354 * Flatsome theme
1355 */
1356 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'flatsome_woocommerce_shop_loop_category', 0);
1357
1358 /**
1359 * Woostify theme
1360 */
1361 $this->remove_action_if_exists('loop_shop_columns', 'woostify_products_per_row');
1362 $this->remove_action_if_exists('loop_shop_per_page', 'woostify_products_per_page');
1363 $this->remove_action_if_exists('woocommerce_loop_add_to_cart_link', 'woostify_modify_woocommerce_loop_add_to_cart_link', 99);
1364
1365
1366 // Remove Woostify before shop loop item title hooks
1367 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'woostify_loop_product_wrapper_open', 10);
1368 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'woostify_print_out_of_stock_label', 15);
1369 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'woostify_loop_product_image_wrapper_open', 20);
1370 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'woostify_change_sale_flash', 23);
1371 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'woostify_product_loop_item_action', 25);
1372 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'woostify_loop_product_link_open', 30);
1373 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'woostify_loop_product_hover_image', 40);
1374 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'woostify_loop_product_image', 50);
1375 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'woostify_loop_product_link_close', 60);
1376 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'woostify_loop_product_add_to_cart_on_image', 70);
1377 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'woostify_product_loop_item_wishlist_icon_bottom', 80);
1378 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'woostify_loop_product_image_wrapper_close', 90);
1379 $this->remove_action_if_exists('woocommerce_before_shop_loop_item_title', 'woostify_loop_product_content_open', 100);
1380
1381 // Remove Woostify shop loop item title hooks
1382 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'woostify_add_template_loop_product_category', 5);
1383 $this->remove_action_if_exists('woocommerce_shop_loop_item_title', 'woostify_add_template_loop_product_title', 10);
1384
1385 // Remove Woostify after shop loop item title hooks
1386 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'woostify_loop_product_rating', 2);
1387 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'woostify_loop_product_meta_open', 5);
1388 $this->remove_action_if_exists('woocommerce_after_shop_loop_item_title', 'woostify_loop_product_price', 10);
1389
1390 // Remove Woostify after shop loop item hooks
1391 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'woostify_loop_product_add_to_cart_button', 10);
1392 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'woostify_loop_product_meta_close', 20);
1393 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'woostify_loop_product_content_close', 50);
1394 $this->remove_action_if_exists('woocommerce_after_shop_loop_item', 'woostify_loop_product_wrapper_close', 100);
1395
1396 }
1397
1398
1399 /**
1400 * This is a code of 14th class for some very tricky position we are
1401 * It is totally possible to get wrong instance priority with this function, hence the wrong action removed but practically highly unlikely :fingercross
1402 *
1403 *
1404 * @param $tag
1405 * @param $class_name - must a full qualified class name
1406 * @param $instance_method
1407 * @param int $spl_hash_length - this is 32 right now [https://github.com/php/php-src/blob/82ccd47d397314d82feeb90b055625f0fcc9bde4/ext/spl/php_spl.c], or $ln = strlen(spl_object_hash( new stdClass()))
1408 * @return bool|int|string
1409 */
1410 private function has_filter_14($tag, $class_name, $instance_method, $spl_hash_length = 32) {
1411
1412 if(has_action($tag)) {
1413
1414 global $wp_filter;
1415
1416 $callbacks = $wp_filter[$tag]->callbacks;
1417
1418 if(!empty($callbacks)) {
1419
1420 foreach($callbacks as $priority => $arr) {
1421
1422 foreach($arr as $ky => $conf) {
1423
1424 if(strpos($ky, $instance_method) !== false) {
1425
1426 if($ky == $class_name . '::' . $instance_method) {
1427 return true;
1428 }
1429
1430 if(isset($conf['function'][0]) && $conf['function'][0] instanceof $class_name) {
1431
1432 $rem = str_replace($instance_method, '', $ky);
1433
1434 return strlen($rem) == $spl_hash_length ? $priority : false;
1435 }
1436 }
1437 }
1438 }
1439 }
1440 }
1441
1442 return false;
1443 }
1444
1445 /**
1446 * @param $tag
1447 * @param $class_name
1448 * @param $instance_method
1449 * @param $priority
1450 * @param int $spl_hash_length
1451 * @return bool
1452 */
1453 private function remove_action_14($tag, $class_name, $instance_method, $priority, $spl_hash_length = 32) {
1454
1455 if($priority === false) {
1456 return false;
1457 }
1458
1459 global $wp_filter;
1460
1461 if(!empty($wp_filter[$tag]->callbacks[$priority])) {
1462
1463 foreach($wp_filter[$tag]->callbacks[$priority] as $ky => $conf) {
1464
1465 if(strpos($ky, $instance_method) !== false) {
1466
1467 if($ky == $class_name . '::' . $instance_method) {
1468
1469 unset($wp_filter[$tag]->callbacks[$priority][$ky]);
1470
1471 return true;
1472 }
1473
1474 $rem = str_replace($instance_method, '', $ky);
1475
1476 if(strlen($rem) == $spl_hash_length) {
1477
1478 unset($wp_filter[$tag]->callbacks[$priority][$ky]);
1479
1480 return true;
1481 }
1482 }
1483 }
1484 }
1485
1486 return false;
1487 }
1488
1489 /**
1490 * Are you wandering about the number 14? :D, why??
1491 * Still nosy? - because this is a hacky solution for an awkward situation we are in!
1492 *
1493 * @param $tag
1494 * @param $class_name - full qualified class name
1495 * @param $instance_method
1496 * @return bool
1497 */
1498 private function remove_action_if_found_14($tag, $class_name, $instance_method, $priority = 10) {
1499 //$priority = $this->has_filter_14($tag, $class_name, $instance_method);
1500 return $this->remove_action_14($tag, $class_name, $instance_method, $priority);
1501 }
1502
1503
1504 private function remove_action_if_exists($tag, $func, $priority = null) {
1505
1506 if($priority === null) {
1507
1508 if(has_action($tag, $func) !== false) {
1509
1510 remove_action($tag, $func);
1511 }
1512
1513 return;
1514 }
1515
1516
1517 if(has_action($tag, $func) !== false) {
1518
1519 remove_action($tag, $func, intval($priority));
1520 }
1521
1522 return;
1523 }
1524
1525
1526 private function add_action_if_not_exists($tag, $func, $priority = null) {
1527
1528 if($priority === null) {
1529
1530 if(has_action($tag, $func) === false) {
1531
1532 add_action($tag, $func);
1533 }
1534
1535 return;
1536 }
1537
1538 if(has_action($tag, $func) === false) {
1539
1540 add_action($tag, $func, intval($priority));
1541 }
1542
1543 return;
1544 }
1545
1546 /**
1547 * Prevent checkout template override
1548 * (This medhod is calling from ShopEngine\Core\Page_Templates\Hooks\Base class)
1549 *
1550 * @param string $template
1551 * @param string $template_name
1552 * @param string $template_path
1553 *
1554 * @return string
1555 */
1556 public function prevent_theme_override_for_checkout( $template, $template_name, $template_path ) {
1557
1558 if ($template_name === 'checkout/payment.php') {
1559
1560 return WC()->plugin_path() . '/templates/' . $template_name;
1561 }
1562
1563 return $template;
1564 }
1565 }
1566