forked from SargasTM/jet-smart-filters-astra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjet-smart-filters-astra.php
35 lines (26 loc) · 1000 Bytes
/
jet-smart-filters-astra.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
/**
* Plugin Name: JetSmartFilters - Astra compatibility
* Plugin URI: #
* Description: Adds some compatibility with the Astra theme.
* Version: 1.0.0
* Author: Crocoblock
* Author URI: https://crocoblock.com/
* License: GPL-3.0+
* License URI: http://www.gnu.org/licenses/gpl-3.0.txt
* Domain Path: /languages
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die();
}
add_filter( 'jet-smart-filters/providers/epro-products/before-ajax-content', 'jet_smart_filters_astra_shop_customization' );
add_filter( 'jet-smart-filters/providers/epro-archive-products/before-ajax-content', 'jet_smart_filters_astra_shop_customization' );
if ( ! function_exists( 'jet_smart_filters_astra_shop_customization' ) ) {
function jet_smart_filters_astra_shop_customization() {
if ( class_exists( 'Astra_Woocommerce' ) ) {
Astra_Woocommerce::get_instance()->woocommerce_init();
Astra_Woocommerce::get_instance()->shop_customization();
}
}
}