PluginProbe ʕ •ᴥ•ʔ
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution / 3.1.0
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution v3.1.0
4.9.2 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 / core / page-templates / hooks / archive.php
shopengine / core / page-templates / hooks Last commit date
archive.php 3 years ago base-content.php 3 years ago base.php 3 years ago cart.php 3 years ago checkout.php 3 years ago shop.php 3 years ago single.php 3 years ago
archive.php
65 lines
1 <?php
2
3 namespace ShopEngine\Core\Page_Templates\Hooks;
4
5 use ShopEngine\Compatibility\Conflicts\Theme_Hooks;
6
7 defined('ABSPATH') || exit;
8
9 class Archive extends Base {
10
11 protected $page_type = 'archive';
12 protected $template_part = 'content-archive.php';
13
14 public function init() : void {
15
16 add_action('wp_enqueue_scripts', [$this, 'enqueue_css_with_conflicts_removed'], 9999);
17 add_filter('woocommerce_enqueue_styles', [Theme_Hooks::instance(), 'force_load_woocommerce_css'], 9998);
18
19 // add_action('woocommerce_before_shop_loop_item', [$this, 'delayed_hook_conflicts'], 9999);
20 $this->delayed_hook_conflicts();
21 }
22
23 public function delayed_hook_conflicts() {
24
25 // add_action('template_include', function ($template) {
26
27 // if($this->tpl_loaded) {
28
29 Theme_Hooks::instance()->theme_conflicts_archive_page_after_wp_loaded();
30 Theme_Hooks::instance()->theme_conflicts_in_specific_footer_area();
31 // }
32
33 // return $template;
34
35 // }, 9991);
36 }
37
38 public function enqueue_css_with_conflicts_removed() {
39
40 wp_dequeue_style('oceanwp-woocommerce');
41
42
43 if(!wp_style_is('woocommerce-general', 'registered')) {
44
45 $styles = \WC_Frontend_Scripts::get_styles();
46
47 if($styles) {
48 foreach($styles as $handle => $args) {
49
50 wp_register_style($handle, $args['src'], $args['deps'], $args['version'], $args['media']);
51 }
52 }
53 }
54
55 wp_enqueue_style('woocommerce-general');
56 wp_enqueue_style('woocommerce-layout');
57 }
58
59
60 protected function template_include_pre_condition(): bool {
61 //phpcs:ignore WordPress.Security.NonceVerification.Recommended -- It's a fronted user part, not possible to verify nonce here
62 return is_product_category() || is_product_tag() || is_tax(get_object_taxonomies('product')) || (is_search() && !empty($_REQUEST['post_type']) && $_REQUEST['post_type'] == 'product');
63 }
64 }
65