Advanced AJAX Product Filters - Version 1.5.5.2

Version Description

  • Fix - Divi Builder modules for latest version Divi theme
Download this release

Release Info

Developer RazyRx
Plugin Icon wp plugin Advanced AJAX Product Filters
Version 1.5.5.2
Comparing to
See all releases

Code changes from version 1.5.5.1 to 1.5.5.2

includes/admin/admin_bar.php CHANGED
@@ -194,6 +194,7 @@ if( ! class_exists('BeRocket_aapf_admin_bar_debug') ) {
194
  }
195
  function get_css() {
196
  $html = '<style>#wp-admin-bar-bapf_debug_bar .ab-submenu .ab-item {height:initial!important;line-height:1em;}
 
197
  #wp-admin-bar-bapf_debug_bar.brapf_admin_error_alert .ab-item .dashicons.dashicons-info-outline {margin-left: 5px;font-family: dashicons;font-size: 24px;line-height:32px;cursor:pointer;color: red; transform: rotate(180deg);}
198
  #wp-admin-bar-bapf_debug_bar .ab-submenu .ab-item *{line-height:1em;color:#ccc;}
199
  #wp-admin-bar-bapf_debug_bar .ab-submenu .ab-item h2{color:white;font-size: 1.5em;text-align:center;}
194
  }
195
  function get_css() {
196
  $html = '<style>#wp-admin-bar-bapf_debug_bar .ab-submenu .ab-item {height:initial!important;line-height:1em;}
197
+ #wp-admin-bar-bapf_debug_bar .ab-item {display: flex;align-items: center;}
198
  #wp-admin-bar-bapf_debug_bar.brapf_admin_error_alert .ab-item .dashicons.dashicons-info-outline {margin-left: 5px;font-family: dashicons;font-size: 24px;line-height:32px;cursor:pointer;color: red; transform: rotate(180deg);}
199
  #wp-admin-bar-bapf_debug_bar .ab-submenu .ab-item *{line-height:1em;color:#ccc;}
200
  #wp-admin-bar-bapf_debug_bar .ab-submenu .ab-item h2{color:white;font-size: 1.5em;text-align:center;}
includes/compatibility/divi-theme-builder.php CHANGED
@@ -6,7 +6,7 @@ if( ! class_exists('BeRocket_AAPF_compat_Divi_theme_builder') ) {
6
  add_filter('et_pb_all_fields_unprocessed_et_pb_shop', array($this, 'add_field'));
7
  add_filter('et_pb_module_shortcode_attributes', array($this, 'attribute_get'), 10, 5);
8
  add_filter('bapf_isoption_ajax_site', array($this, 'enable_for_builder'));
9
- if(defined('DOING_AJAX') && berocket_isset($_REQUEST['action']) == 'et_fb_ajax_render_shortcode') {
10
  add_filter('braapf_check_widget_by_instance_single', array($this, 'disable_conditions'));
11
  add_filter('braapf_check_widget_by_instance_group', array($this, 'disable_conditions'));
12
  }
@@ -61,7 +61,8 @@ if( ! class_exists('BeRocket_AAPF_compat_Divi_theme_builder') ) {
61
  return false;
62
  }
63
  function enable_for_builder($enabled) {
64
- if( br_get_value_from_array($_GET,'et_fb') == 1 || (defined('DOING_AJAX') && berocket_isset($_REQUEST['action']) == 'et_fb_ajax_render_shortcode') ) {
 
65
  $enabled = true;
66
 
67
  }
@@ -85,7 +86,8 @@ if( ! class_exists('BeRocket_AAPF_compat_Divi_theme_builder') ) {
85
  && typeof(ET_Builder.Frames.app.window) != 'undefined' ) {
86
  clearInterval(bapf_et_check);
87
  berocket_add_filter('braapf_init', braapf_init_for_iframes_divi);
88
- jQuery(ET_Builder.Frames.app.window).on('et_fb_module_did_update_et_pb_br_filter_single', function(){braapf_init_load();});
 
89
  berocket_remove_filter('update_products', braapf_update_products);
90
  braapf_init_load();
91
  }
6
  add_filter('et_pb_all_fields_unprocessed_et_pb_shop', array($this, 'add_field'));
7
  add_filter('et_pb_module_shortcode_attributes', array($this, 'attribute_get'), 10, 5);
8
  add_filter('bapf_isoption_ajax_site', array($this, 'enable_for_builder'));
9
+ if(defined('DOING_AJAX') && in_array(berocket_isset($_REQUEST['action']), array('et_fb_ajax_render_shortcode', 'brapf_get_single_filter', 'brapf_get_group_filter'))) {
10
  add_filter('braapf_check_widget_by_instance_single', array($this, 'disable_conditions'));
11
  add_filter('braapf_check_widget_by_instance_group', array($this, 'disable_conditions'));
12
  }
61
  return false;
62
  }
63
  function enable_for_builder($enabled) {
64
+ if( br_get_value_from_array($_GET,'et_fb') == 1 || (defined('DOING_AJAX')
65
+ && in_array(berocket_isset($_REQUEST['action']), array('et_fb_ajax_render_shortcode', 'brapf_get_single_filter', 'brapf_get_group_filter'))) ) {
66
  $enabled = true;
67
 
68
  }
86
  && typeof(ET_Builder.Frames.app.window) != 'undefined' ) {
87
  clearInterval(bapf_et_check);
88
  berocket_add_filter('braapf_init', braapf_init_for_iframes_divi);
89
+ jQuery(ET_Builder.Frames.app.window).on('et_fb_module_did_mount_et_pb_br_filter_single et_fb_module_did_update_et_pb_br_filter_single', function(){braapf_init_load();});
90
+ jQuery(ET_Builder.Frames.app.window).on('bapf_update_et_pb_br_filter_single', function() {setTimeout(function() {braapf_init_load();}, 10);});
91
  berocket_remove_filter('update_products', braapf_update_products);
92
  braapf_init_load();
93
  }
includes/divi-builder.php DELETED
@@ -1,122 +0,0 @@
1
- <?php
2
- function berocket_filter_et_builder_ready() {
3
- if( class_exists('ET_Builder_Module') ) {
4
- class ET_Builder_Module_br_filter_single extends ET_Builder_Module {
5
- public $vb_support = 'partial';
6
- function init() {
7
- $this->name = __( 'Single Filter', 'BeRocket_AJAX_domain' );
8
- $this->slug = 'et_pb_br_filter_single';
9
-
10
- $this->fields_defaults = array(
11
- 'filter_id' => array(''),
12
- );
13
- }
14
-
15
- function get_fields() {
16
- $query = new WP_Query(array('post_type' => 'br_product_filter', 'nopaging' => true, 'fields' => 'ids'));
17
- $posts = $query->get_posts();
18
- $filter_list = array('0' => __('--Please select filter--', 'BeRocket_AJAX_domain'));
19
- if ( is_array($posts) && count($posts) ) {
20
- foreach($posts as $post_id) {
21
- $filter_list[$post_id] = get_the_title($post_id) . ' (ID:' . $post_id . ')';
22
- }
23
- }
24
-
25
- $fields = array(
26
- 'filter_id' => array(
27
- 'label' => esc_html__( 'Filter', 'BeRocket_AJAX_domain' ),
28
- 'type' => 'select',
29
- 'options' => $filter_list,
30
- ),
31
- );
32
-
33
- return $fields;
34
- }
35
-
36
- function render( $atts, $content = null, $function_name = '' ) {
37
- $html = '';
38
- if( ! empty($atts['filter_id']) ) {
39
- $html .= trim(do_shortcode('[br_filter_single filter_id='.$atts['filter_id'].']'));
40
- }
41
- if(empty($html) && defined('DOING_AJAX') && berocket_isset($_REQUEST['action']) == 'et_fb_ajax_render_shortcode') {
42
- $html .= '<h3 style="background-color:gray;color:white;">'.__('BeRocket Filter', 'BeRocket_AJAX_domain').'</h3>';
43
- }
44
-
45
- return $html;
46
- }
47
- }
48
- new ET_Builder_Module_br_filter_single;
49
- class ET_Builder_Module_br_filters_group extends ET_Builder_Module {
50
- public $vb_support = 'partial';
51
- function init() {
52
- $this->name = __( 'Group Filter', 'BeRocket_AJAX_domain' );
53
- $this->slug = 'et_pb_br_filters_group';
54
-
55
- $this->fields_defaults = array(
56
- 'group_id' => array(''),
57
- );
58
- }
59
-
60
- function get_fields() {
61
- $query = new WP_Query(array('post_type' => 'br_filters_group', 'nopaging' => true, 'fields' => 'ids'));
62
- $posts = $query->get_posts();
63
- $filter_list = array('0' => __('--Please select group--', 'BeRocket_AJAX_domain'));
64
- if ( is_array($posts) && count($posts) ) {
65
- foreach($posts as $post_id) {
66
- $filter_list[$post_id] = get_the_title($post_id) . ' (ID:' . $post_id . ')';
67
- }
68
- }
69
- $fields = array(
70
- 'group_id' => array(
71
- 'label' => esc_html__( 'Group', 'BeRocket_AJAX_domain' ),
72
- 'type' => 'select',
73
- 'options' => $filter_list,
74
- ),
75
- );
76
-
77
- return $fields;
78
- }
79
-
80
- function render( $atts, $content = null, $function_name = '' ) {
81
- $html = '';
82
- if( ! empty($atts['group_id']) ) {
83
- $html .= trim(do_shortcode('[br_filters_group group_id='.$atts['group_id'].']'));
84
- }
85
- if(empty($html) && defined('DOING_AJAX') && berocket_isset($_REQUEST['action']) == 'et_fb_ajax_render_shortcode') {
86
- $html .= '<h3 style="background-color:gray;color:white;">'.__('BeRocket Filter', 'BeRocket_AJAX_domain').'</h3>';
87
- }
88
-
89
- return $html;
90
- }
91
- }
92
- new ET_Builder_Module_br_filters_group;
93
-
94
- class ET_Builder_Module_braapf_filter_next extends ET_Builder_Module {
95
- function init() {
96
- $this->name = __( 'BeRocket Filter Next Product', 'BeRocket_AJAX_domain' );
97
- $this->slug = 'et_pb_braapf_filter_next';
98
- $this->fields_defaults = array();
99
- }
100
-
101
- function get_fields() {
102
- $fields = array();
103
- return $fields;
104
- }
105
-
106
- function render( $atts, $content = null, $function_name = '' ) {
107
- add_filter('berocket_aapf_wcshortcode_is_filtering', array($this, 'enable_filtering'));
108
- return '';
109
- }
110
-
111
- protected function _add_additional_border_fields() {
112
- $this->advanced_options["border"]['css'] = array();
113
- }
114
- function enable_filtering($enabled) {
115
- remove_filter('berocket_aapf_wcshortcode_is_filtering', array($this, 'enable_filtering'));
116
- return true;
117
- }
118
- }
119
- new ET_Builder_Module_braapf_filter_next;
120
- }
121
- }
122
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/divi/DiviExtension.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class BAPF_DiviExtension extends DiviExtension {
4
+
5
+ public $gettext_domain = 'bapf-diviextension';
6
+
7
+ public $name = 'bapf-diviextension';
8
+ public $version = '1.0.0';
9
+ public function __construct( $name = 'my-extension', $args = array() ) {
10
+ $this->plugin_dir = plugin_dir_path( __FILE__ );
11
+ $this->plugin_dir_url = plugins_url('/', __FILE__);
12
+
13
+ parent::__construct( $name, $args );
14
+ add_action('wp_ajax_brapf_get_single_filter', array($this, 'get_single_filter'));
15
+ add_action('wp_ajax_brapf_get_group_filter', array($this, 'get_group_filter'));
16
+ }
17
+ public function get_single_filter() {
18
+ $filter_id = (empty($_POST['filter_id']) ? '' : intval($_POST['filter_id']));
19
+ if( ! empty($filter_id) ) {
20
+ $filter = do_shortcode('[br_filter_single filter_id='.$filter_id.']');
21
+ if( ! empty($filter) ) {
22
+ $filter .= '<script>jQuery(ET_Builder.Frames.app.window).trigger("bapf_update_et_pb_br_filter_single");</script>';
23
+ }
24
+ echo $filter;
25
+ }
26
+ wp_die();
27
+ }
28
+ public function get_group_filter() {
29
+ $group_id = (empty($_POST['group_id']) ? '' : intval($_POST['group_id']));
30
+ if( ! empty($group_id) ) {
31
+ $group = do_shortcode('[br_filters_group group_id='.$group_id.']');
32
+ if( ! empty($group) ) {
33
+ $group .= '<script>jQuery(ET_Builder.Frames.app.window).trigger("bapf_update_et_pb_br_filter_single");</script>';
34
+ }
35
+ echo $group;
36
+ }
37
+ wp_die();
38
+ }
39
+ }
40
+
41
+ new BAPF_DiviExtension;
includes/divi/fields/Input/Input.jsx ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // External Dependencies
2
+ import React, { Component } from 'react';
3
+
4
+ // Internal Dependencies
5
+ import './style.css';
6
+
7
+ class Input extends Component {
8
+
9
+ static slug = 'myex_input';
10
+
11
+ /**
12
+ * Handle input value change.
13
+ *
14
+ * @param {object} event
15
+ */
16
+ _onChange = (event) => {
17
+ this.props._onChange(this.props.name, event.target.value);
18
+ }
19
+
20
+ render() {
21
+ return(
22
+ <input
23
+ id={`myex-input-${this.props.name}`}
24
+ name={this.props.name}
25
+ value={this.props.value}
26
+ type='text'
27
+ className='myex-input'
28
+ onChange={this._onChange}
29
+ placeholder='Your text here ...'
30
+ />
31
+ );
32
+ }
33
+ }
34
+
35
+ export default Input;
includes/divi/fields/Input/style.css ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ input.myex-input {
2
+ background: #f1f5f9;
3
+ max-height: 30px;
4
+ border: 0;
5
+ border-radius: 3px;
6
+ padding: 7px 10px;
7
+ box-sizing: border-box;
8
+ transition: background 200ms ease;
9
+ color: #4C5866;
10
+ font-family: 'Open Sans', Helvetica, Roboto, Arial, sans-serif;
11
+ font-size: 13px;
12
+ font-weight: 600;
13
+ line-height: normal;
14
+ display: block;
15
+ width: 100%;
16
+ }
17
+
18
+ input.myex-input:focus {
19
+ background: #e6ecf2;
20
+ }
21
+
22
+ input.myex-input::-webkit-input-placeholder {
23
+ color: #98a7b8;
24
+ }
25
+
26
+ input.myex-input:-moz-placeholder {
27
+ color: #98a7b8;
28
+ }
29
+
30
+ input.myex-input::-moz-placeholder {
31
+ color: #98a7b8;
32
+ }
33
+
34
+ input.myex-input:-ms-input-placeholder {
35
+ color: #98a7b8;
36
+ }
37
+
38
+ input.myex-input[readonly] {
39
+ background: #ffffff !important;
40
+ border: 1px solid #eaedf0 !important;
41
+ cursor: not-allowed;
42
+ }
includes/divi/fields/index.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ import Input from './Input/Input';
2
+
3
+ export default [Input];
includes/divi/loader.js ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ // External Dependencies
2
+ import $ from 'jquery';
3
+
4
+ // Internal Dependencies
5
+ import modules from './modules';
6
+ import fields from './fields';
7
+
8
+ $(window).on('et_builder_api_ready', (event, API) => {
9
+ API.registerModules(modules);
10
+ API.registerModalFields(fields);
11
+ });
includes/divi/loader.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! class_exists( 'ET_Builder_Element' ) ) {
4
+ return;
5
+ }
6
+
7
+ $module_files = glob( __DIR__ . '/modules/*/*.php' );
8
+
9
+ // Load custom Divi Builder modules
10
+ foreach ( (array) $module_files as $module_file ) {
11
+ if ( $module_file && preg_match( "/\/modules\/\b([^\/]+)\/\\1\.php$/", $module_file ) ) {
12
+ require_once $module_file;
13
+ }
14
+ }
includes/divi/modules/filternext/filternext.jsx ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // External Dependencies
2
+ import React, { Component } from 'react';
3
+
4
+ class BAPFFilterNext extends Component {
5
+
6
+ static slug = 'et_pb_braapf_filter_next';
7
+
8
+ render() {
9
+ return (
10
+ <div style={{padding:"2em 0", background: "#6c2eb9", color: "#fff", fontSize: "12px", fontWeight: "600", verticalAlign: "middle", textAlign: "center", borderRadius: "1em"}}>
11
+ <h3 style={{color: "#000", textShadow: "1px 0px white, -1px 0px white, 0px 1px white, 0px -1px white", fontWeight: "900"}}>BeRocket Filter Next Product</h3>
12
+ Next products query will be filtered(query must use WooCommerce shortcode hooks)
13
+ </div>
14
+ );
15
+ }
16
+ }
17
+
18
+ export default BAPFFilterNext;
includes/divi/modules/filternext/filternext.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class ET_Builder_Module_braapf_filter_next extends ET_Builder_Module {
4
+
5
+ public $slug = 'et_pb_braapf_filter_next';
6
+ public $vb_support = 'on';
7
+
8
+ protected $module_credits = array(
9
+ 'module_uri' => '',
10
+ 'author' => '',
11
+ 'author_uri' => '',
12
+ );
13
+
14
+ public function init() {
15
+ $this->name = __( 'BeRocket Filter Next Product', 'BeRocket_AJAX_domain' );
16
+ $this->fields_defaults = array();
17
+ }
18
+
19
+ function get_fields() {
20
+ $fields = array();
21
+ return $fields;
22
+ }
23
+
24
+ function render( $atts, $content = null, $function_name = '' ) {
25
+ add_filter('berocket_aapf_wcshortcode_is_filtering', array($this, 'enable_filtering'));
26
+ return '';
27
+ }
28
+
29
+ protected function _add_additional_border_fields() {
30
+ $this->advanced_options["border"]['css'] = array();
31
+ }
32
+ function enable_filtering($enabled) {
33
+ remove_filter('berocket_aapf_wcshortcode_is_filtering', array($this, 'enable_filtering'));
34
+ return true;
35
+ }
36
+ }
37
+
38
+ new ET_Builder_Module_braapf_filter_next;
includes/divi/modules/group/group.jsx ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // External Dependencies
2
+ import React, { Component } from 'react';
3
+
4
+ class BAPFGroupFilters extends Component {
5
+
6
+ static slug = 'et_pb_br_filters_group';
7
+
8
+ render() {
9
+ return (
10
+ <div style={{padding:"2em 0", background: "#6c2eb9", color: "#fff", fontSize: "12px", fontWeight: "600", verticalAlign: "middle", textAlign: "center", borderRadius: "1em"}}>
11
+ <h3 style={{color: "#000", textShadow: "1px 0px white, -1px 0px white, 0px 1px white, 0px -1px white", fontWeight: "900"}}>Group Filter</h3>
12
+ Filters Group not displayed in Builder
13
+ </div>
14
+ );
15
+ }
16
+ }
17
+
18
+ export default BAPFGroupFilters;
includes/divi/modules/group/group.php ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class ET_Builder_Module_br_filters_group extends ET_Builder_Module {
4
+
5
+ public $slug = 'et_pb_br_filters_group';
6
+ public $vb_support = 'on';
7
+
8
+ protected $module_credits = array(
9
+ 'module_uri' => '',
10
+ 'author' => '',
11
+ 'author_uri' => '',
12
+ );
13
+
14
+ public function init() {
15
+ $this->name = __( 'Group Filter', 'BeRocket_AJAX_domain' );
16
+
17
+ $this->fields_defaults = array(
18
+ 'filter_id' => array(''),
19
+ );
20
+ }
21
+
22
+ function get_fields() {
23
+ $query = new WP_Query(array('post_type' => 'br_filters_group', 'nopaging' => true, 'fields' => 'ids'));
24
+ $posts = $query->get_posts();
25
+ $filter_list = array('0' => __('--Please select group--', 'BeRocket_AJAX_domain'));
26
+ if ( is_array($posts) && count($posts) ) {
27
+ foreach($posts as $post_id) {
28
+ $filter_list[$post_id] = get_the_title($post_id) . ' (ID:' . $post_id . ')';
29
+ }
30
+ }
31
+ $fields = array(
32
+ 'group_id' => array(
33
+ 'label' => esc_html__( 'Group', 'BeRocket_AJAX_domain' ),
34
+ 'type' => 'select',
35
+ 'options' => $filter_list,
36
+ ),
37
+ );
38
+
39
+ return $fields;
40
+ }
41
+
42
+ function render( $atts, $content = null, $function_name = '' ) {
43
+ $html = '';
44
+ if( ! empty($atts['group_id']) ) {
45
+ $html .= trim(do_shortcode('[br_filters_group group_id='.$atts['group_id'].']'));
46
+ }
47
+ if(empty($html) && defined('DOING_AJAX') && in_array(berocket_isset($_REQUEST['action']), array('et_fb_ajax_render_shortcode', 'brapf_get_single_filter', 'brapf_get_group_filter'))) {
48
+ $html .= '<h3 style="background-color:gray;color:white;">'.__('BeRocket Filter', 'BeRocket_AJAX_domain').'</h3>';
49
+ }
50
+
51
+ return $html;
52
+ }
53
+ }
54
+
55
+ new ET_Builder_Module_br_filters_group;
includes/divi/modules/group/style.css ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ .myex_hello_world {
2
+
3
+ }
includes/divi/modules/index.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ import single from './single/single';
2
+ import group from './group/group';
3
+ import filternext from './filternext/filternext';
4
+
5
+ export default [single, group, filternext];
includes/divi/modules/single/single.jsx ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // External Dependencies
2
+ import React, { Component } from 'react';
3
+
4
+ class BAPFSingleFilter extends Component {
5
+
6
+ static slug = 'et_pb_br_filter_single';
7
+ constructor(props) {
8
+ super(props);
9
+ this.state = {
10
+ error: null,
11
+ isLoaded: false,
12
+ content: null
13
+ };
14
+ }
15
+ render() {
16
+ const { error, isLoaded, content } = this.state;
17
+
18
+ if (error) {
19
+ return (<div>{error.message}</div>);
20
+ } else if (!isLoaded) {
21
+ return (<div class="et-fb-loader-wrapper"><div class="et-fb-loader"></div></div>);
22
+ } else {
23
+ return ({content});
24
+ }
25
+ }
26
+ componentDidMount() {
27
+ var body = new FormData();
28
+ body.append('action', 'brapf_get_single_filter');
29
+ body.append('filter_id', this.props.filter_id);
30
+
31
+ fetch(
32
+ window.et_fb_options.ajaxurl,
33
+ {
34
+ body: body,
35
+ method: 'POST',
36
+ }
37
+ )
38
+ .then(
39
+ (result) => {
40
+ this.setState({
41
+ isLoaded: true,
42
+ content: result
43
+ });
44
+ },
45
+ (error) => {
46
+ this.setState({
47
+ isLoaded: true,
48
+ error
49
+ });
50
+ }
51
+ )
52
+ }
53
+ }
54
+
55
+ export default BAPFSingleFilter;
includes/divi/modules/single/single.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class ET_Builder_Module_br_filter_single extends ET_Builder_Module {
4
+
5
+ public $slug = 'et_pb_br_filter_single';
6
+ public $vb_support = 'on';
7
+
8
+ protected $module_credits = array(
9
+ 'module_uri' => '',
10
+ 'author' => '',
11
+ 'author_uri' => '',
12
+ );
13
+
14
+ public function init() {
15
+ $this->name = __( 'Single Filter', 'BeRocket_AJAX_domain' );
16
+
17
+ $this->fields_defaults = array(
18
+ 'filter_id' => array(''),
19
+ );
20
+ }
21
+
22
+ function get_fields() {
23
+ $query = new WP_Query(array('post_type' => 'br_product_filter', 'nopaging' => true, 'fields' => 'ids'));
24
+ $posts = $query->get_posts();
25
+ $filter_list = array('0' => __('--Please select filter--', 'BeRocket_AJAX_domain'));
26
+ if ( is_array($posts) && count($posts) ) {
27
+ foreach($posts as $post_id) {
28
+ $filter_list[$post_id] = get_the_title($post_id) . ' (ID:' . $post_id . ')';
29
+ }
30
+ }
31
+
32
+ $fields = array(
33
+ 'filter_id' => array(
34
+ 'label' => esc_html__( 'Filter', 'BeRocket_AJAX_domain' ),
35
+ 'type' => 'select',
36
+ 'options' => $filter_list,
37
+ ),
38
+ );
39
+
40
+ return $fields;
41
+ }
42
+
43
+ function render( $atts, $content = null, $function_name = '' ) {
44
+ $html = '';
45
+ if( ! empty($atts['filter_id']) ) {
46
+ $html .= trim(do_shortcode('[br_filter_single filter_id='.$atts['filter_id'].']'));
47
+ }
48
+ if(empty($html) && defined('DOING_AJAX') && in_array(berocket_isset($_REQUEST['action']), array('et_fb_ajax_render_shortcode', 'brapf_get_single_filter', 'brapf_get_group_filter'))) {
49
+ $html .= '<h3 style="background-color:gray;color:white;">'.__('BeRocket Filter', 'BeRocket_AJAX_domain').'</h3>';
50
+ }
51
+
52
+ return $html;
53
+ }
54
+ }
55
+
56
+ new ET_Builder_Module_br_filter_single;
includes/divi/modules/single/style.css ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ .myex_hello_world {
2
+
3
+ }
includes/divi/scripts/builder-bundle.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=2)}([function(e,t){e.exports=React},function(e,t){},function(e,t,n){n(3),e.exports=n(4)},function(e,t,n){"use strict"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),o=n.n(r),i=n(6),a=n(10);o()(window).on("et_builder_api_ready",function(e,t){t.registerModules(i.a),t.registerModalFields(a.a)})},function(e,t){e.exports=jQuery},function(e,t,n){"use strict";var r=n(7),o=n(8),i=n(9);t.a=[r.a,o.a,i.a]},function(e,t,n){"use strict";var r=n(0),o=n.n(r);function i(e){return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return!t||"object"!==i(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}var u=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=l(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))).htmlstate=o.a.createElement("div",null),n.state={error:null,isLoaded:!1},n}var n,i,u;return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r["Component"]),n=t,(i=[{key:"render",value:function(){var e=this.state,t=e.error,n=e.isLoaded;if(t)return o.a.createElement("div",null,t.message);if(n){var r=new Event("bapf_update_et_pb_br_filter_single");return window.dispatchEvent(r),this.htmlstate}return o.a.createElement("div",{style:{height:"100px"}},o.a.createElement("div",{class:"et-fb-loader-wrapper"},o.a.createElement("div",{class:"et-fb-loader"})))}},{key:"componentDidUpdate",value:function(e){var t=this.props;e.filter_id!=t.filter_id&&(this.setState({error:null,isLoaded:!1}),this.componentDidMount())}},{key:"componentDidMount",value:function(){var e=this,t=new FormData;t.append("action","brapf_get_single_filter"),t.append("filter_id",this.props.filter_id),fetch(window.et_fb_options.ajaxurl,{body:t,method:"POST"}).then(function(e){return e.text()}).then(function(t){"undefined"!=typeof t&&t?(e.htmlstate=o.a.createElement("div",{dangerouslySetInnerHTML:{__html:t}}),e.setState({isLoaded:!0})):(e.htmlstate=o.a.createElement("div",{style:{padding:"2em 0",background:"#6c2eb9",color:"#fff",fontSize:"12px",fontWeight:"600",verticalAlign:"middle",textAlign:"center",borderRadius:"1em"}},o.a.createElement("h3",{style:{color:"#000",textShadow:"1px 0px white, -1px 0px white, 0px 1px white, 0px -1px white",fontWeight:"900"}},"Single Filter"),"Filters not displayed in Builder"),e.setState({isLoaded:!0}))},function(t){e.htmlstate=o.a.createElement("div",{style:{padding:"2em 0",background:"#6c2eb9",color:"#fff",fontSize:"12px",fontWeight:"600",verticalAlign:"middle",textAlign:"center",borderRadius:"1em"}},o.a.createElement("h3",{style:{color:"#000",textShadow:"1px 0px white, -1px 0px white, 0px 1px white, 0px -1px white",fontWeight:"900"}},"Single Filter"),"Filters not displayed in Builder"),e.setState({isLoaded:!0})})}}])&&a(n.prototype,i),u&&a(n,u),t}();Object.defineProperty(u,"slug",{configurable:!0,enumerable:!0,writable:!0,value:"et_pb_br_filter_single"}),t.a=u},function(e,t,n){"use strict";var r=n(0),o=n.n(r);function i(e){return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return!t||"object"!==i(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}var u=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=l(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))).htmlstate=o.a.createElement("div",null),n.state={error:null,isLoaded:!1},n}var n,i,u;return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r["Component"]),n=t,(i=[{key:"render",value:function(){var e=this.state,t=e.error,n=e.isLoaded;if(t)return o.a.createElement("div",null,t.message);if(n){var r=new Event("bapf_update_et_pb_br_filter_single");return window.dispatchEvent(r),this.htmlstate}return o.a.createElement("div",{style:{height:"100px"}},o.a.createElement("div",{class:"et-fb-loader-wrapper"},o.a.createElement("div",{class:"et-fb-loader"})))}},{key:"componentDidUpdate",value:function(e){var t=this.props;e.group_id!=t.group_id&&(this.setState({error:null,isLoaded:!1}),this.componentDidMount())}},{key:"componentDidMount",value:function(){var e=this,t=new FormData;t.append("action","brapf_get_group_filter"),t.append("group_id",this.props.group_id),fetch(window.et_fb_options.ajaxurl,{body:t,method:"POST"}).then(function(e){return e.text()}).then(function(t){"undefined"!=typeof t&&t?(e.htmlstate=o.a.createElement("div",{dangerouslySetInnerHTML:{__html:t}}),e.setState({isLoaded:!0})):(e.htmlstate=o.a.createElement("div",{style:{padding:"2em 0",background:"#6c2eb9",color:"#fff",fontSize:"12px",fontWeight:"600",verticalAlign:"middle",textAlign:"center",borderRadius:"1em"}},o.a.createElement("h3",{style:{color:"#000",textShadow:"1px 0px white, -1px 0px white, 0px 1px white, 0px -1px white",fontWeight:"900"}},"Group Filter"),"Filters Group not displayed in Builder"),e.setState({isLoaded:!0}))},function(t){e.htmlstate=o.a.createElement("div",{style:{padding:"2em 0",background:"#6c2eb9",color:"#fff",fontSize:"12px",fontWeight:"600",verticalAlign:"middle",textAlign:"center",borderRadius:"1em"}},o.a.createElement("h3",{style:{color:"#000",textShadow:"1px 0px white, -1px 0px white, 0px 1px white, 0px -1px white",fontWeight:"900"}},"Group Filter"),"Filters Group not displayed in Builder"),e.setState({isLoaded:!0})})}}])&&a(n.prototype,i),u&&a(n,u),t}();Object.defineProperty(u,"slug",{configurable:!0,enumerable:!0,writable:!0,value:"et_pb_br_filters_group"}),t.a=u},function(e,t,n){"use strict";var r=n(0),o=n.n(r);function i(e){return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return!t||"object"!==i(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}var u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}var n,i,u;return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r["Component"]),n=t,(i=[{key:"render",value:function(){return o.a.createElement("div",{style:{padding:"2em 0",background:"#6c2eb9",color:"#fff",fontSize:"12px",fontWeight:"600",verticalAlign:"middle",textAlign:"center",borderRadius:"1em"}},o.a.createElement("h3",{style:{color:"#000",textShadow:"1px 0px white, -1px 0px white, 0px 1px white, 0px -1px white",fontWeight:"900"}},"BeRocket Filter Next Product"),"Next products query will be filtered(query must use WooCommerce shortcode hooks)")}}])&&a(n.prototype,i),u&&a(n,u),t}();Object.defineProperty(u,"slug",{configurable:!0,enumerable:!0,writable:!0,value:"et_pb_braapf_filter_next"}),t.a=u},function(e,t,n){"use strict";var r=n(11);t.a=[r.a]},function(e,t,n){"use strict";var r=n(0),o=n.n(r),i=n(1);n.n(i);function a(e){return(a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return!t||"object"!==a(t)&&"function"!==typeof t?c(e):t}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var p=function(e){function t(){var e,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return u(r,(n=r=u(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),Object.defineProperty(c(r),"_onChange",{configurable:!0,enumerable:!0,writable:!0,value:function(e){r.props._onChange(r.props.name,e.target.value)}}),n))}var n,i,a;return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r["Component"]),n=t,(i=[{key:"render",value:function(){return o.a.createElement("input",{id:"myex-input-".concat(this.props.name),name:this.props.name,value:this.props.value,type:"text",className:"myex-input",onChange:this._onChange,placeholder:"Your text here ..."})}}])&&l(n.prototype,i),a&&l(n,a),t}();Object.defineProperty(p,"slug",{configurable:!0,enumerable:!0,writable:!0,value:"myex_input"}),t.a=p}]);
includes/divi/scripts/frontend-bundle.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(n){var t={};function r(e){if(t[e])return t[e].exports;var o=t[e]={i:e,l:!1,exports:{}};return n[e].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=n,r.c=t,r.d=function(n,t,e){r.o(n,t)||Object.defineProperty(n,t,{configurable:!1,enumerable:!0,get:e})},r.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(t,"a",t),t},r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.p="/",r(r.s=12)}({1:function(n,t){},12:function(n,t,r){r(1),n.exports=r(13)},13:function(n,t){jQuery(function(n){})}});
includes/divi/scripts/frontend.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ // This script is loaded both on the frontend page and in the Visual Builder.
2
+
3
+ jQuery(function($) {});
main.php CHANGED
@@ -196,7 +196,6 @@ class BeRocket_AAPF extends BeRocket_Framework {
196
  BeRocket_AAPF_group_filters::getInstance();
197
  new BeRocket_AAPF_compat_product_table();
198
  new BeRocket_AAPF_compat_JetSmartFilter();
199
- add_action('et_builder_modules_load', 'berocket_filter_et_builder_ready');
200
  add_action('vc_before_init', 'berocket_filter_vc_before_init', 100000);
201
  //----------------------
202
  }
@@ -234,6 +233,7 @@ class BeRocket_AAPF extends BeRocket_Framework {
234
  add_action( 'admin_init', array($this, 'register_admin_assets'));
235
  }
236
 
 
237
  add_action( 'admin_init', array( $this, 'admin_init' ) );
238
  add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
239
  add_shortcode( 'br_filters', array( $this, 'shortcode' ) );
@@ -3157,6 +3157,9 @@ jQuery(document).on('change', '.berocket_disable_ajax_loading', berocket_disable
3157
  public function bapf_wp_footer() {
3158
  do_action('bapf_wp_footer');
3159
  }
 
 
 
3160
  }
3161
 
3162
  new BeRocket_AAPF;
196
  BeRocket_AAPF_group_filters::getInstance();
197
  new BeRocket_AAPF_compat_product_table();
198
  new BeRocket_AAPF_compat_JetSmartFilter();
 
199
  add_action('vc_before_init', 'berocket_filter_vc_before_init', 100000);
200
  //----------------------
201
  }
233
  add_action( 'admin_init', array($this, 'register_admin_assets'));
234
  }
235
 
236
+ add_action( 'divi_extensions_init', array($this, 'divi_extensions_init') );
237
  add_action( 'admin_init', array( $this, 'admin_init' ) );
238
  add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
239
  add_shortcode( 'br_filters', array( $this, 'shortcode' ) );
3157
  public function bapf_wp_footer() {
3158
  do_action('bapf_wp_footer');
3159
  }
3160
+ public function divi_extensions_init() {
3161
+ include_once dirname( __FILE__ ) . '/includes/divi/DiviExtension.php';
3162
+ }
3163
  }
3164
 
3165
  new BeRocket_AAPF;
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: https://berocket.com/product/woocommerce-ajax-products-filter?utm_s
5
  Tags: filters, product filters, ajax product filters, ajax filter, ajax filter widget, color filter, size filter, product onsale filter, product preview, product category filter, product reset filter, product sort by filter, stock filter, product tag filter, price range filter, price box filter, advanced product filters, woocommerce filters, woocommerce product filters, woocommerce products filter, woocommerce ajax product filters, widget, plugin, woocommerce item filters, filters plugin, ajax filters plugin, filter woocommerce products, filter woocommerce products plugin, wc filters, wc filters products, wc products filters, wc ajax products filters, wc product filters, wc advanced product filters, woocommerce layered nav, woocommerce layered navigation, ajax filtered nav, ajax filtered navigation, price filter, ajax price filter, woocommerce product sorting, sidebar filter, sidebar ajax filter, taxonomy filter, category filter, attribute filter, attributes filter, woocommerce product sort, ajax products filter plugin for woocommerce, rocket, berocket, berocket woocommerce ajax products filter
6
  Requires at least: 5.0
7
  Tested up to: 5.8
8
- Stable tag: 1.5.5.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -185,6 +185,9 @@ You can try this plugin's admin side [here](https://berocket.com/product/woocomm
185
 
186
  == Changelog ==
187
 
 
 
 
188
  = 1.5.5.1 =
189
  * Enhancement - Compatibility version: Wordpress 5.8 and WooCommerce 5.5
190
  * Enhancement - Speed up recount functionality for hierarchical taxonomy
5
  Tags: filters, product filters, ajax product filters, ajax filter, ajax filter widget, color filter, size filter, product onsale filter, product preview, product category filter, product reset filter, product sort by filter, stock filter, product tag filter, price range filter, price box filter, advanced product filters, woocommerce filters, woocommerce product filters, woocommerce products filter, woocommerce ajax product filters, widget, plugin, woocommerce item filters, filters plugin, ajax filters plugin, filter woocommerce products, filter woocommerce products plugin, wc filters, wc filters products, wc products filters, wc ajax products filters, wc product filters, wc advanced product filters, woocommerce layered nav, woocommerce layered navigation, ajax filtered nav, ajax filtered navigation, price filter, ajax price filter, woocommerce product sorting, sidebar filter, sidebar ajax filter, taxonomy filter, category filter, attribute filter, attributes filter, woocommerce product sort, ajax products filter plugin for woocommerce, rocket, berocket, berocket woocommerce ajax products filter
6
  Requires at least: 5.0
7
  Tested up to: 5.8
8
+ Stable tag: 1.5.5.2
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
185
 
186
  == Changelog ==
187
 
188
+ = 1.5.5.2 =
189
+ * Fix - Divi Builder modules for latest version Divi theme
190
+
191
  = 1.5.5.1 =
192
  * Enhancement - Compatibility version: Wordpress 5.8 and WooCommerce 5.5
193
  * Enhancement - Speed up recount functionality for hierarchical taxonomy
templates/single_filter/single_settings_elements.php CHANGED
@@ -141,7 +141,7 @@ if( ! class_exists('braapf_single_filter_edit_elements') ) {
141
  );
142
  $order_values_type = br_get_value_from_array($braapf_filter_settings, 'order_values_type', '');
143
  echo '<div class="braapf_order_values_type braapf_half_select_full">';
144
- echo '<label for="braapf_order_values_type">' . __('Values Order', 'BeRocket_AJAX_domain') . '</label>';
145
  echo '<select id="braapf_order_values_type" name="'.$settings_name.'[order_values_type]">';
146
  foreach($sorting_types as $sorting_type) {
147
  echo '<option value="'.$sorting_type['value'].'"'.($order_values_type == $sorting_type['value'] ? ' selected' : '').'>'.$sorting_type['name'].'</option>';
141
  );
142
  $order_values_type = br_get_value_from_array($braapf_filter_settings, 'order_values_type', '');
143
  echo '<div class="braapf_order_values_type braapf_half_select_full">';
144
+ echo '<label for="braapf_order_values_type">' . __('Order Direction', 'BeRocket_AJAX_domain') . '</label>';
145
  echo '<select id="braapf_order_values_type" name="'.$settings_name.'[order_values_type]">';
146
  foreach($sorting_types as $sorting_type) {
147
  echo '<option value="'.$sorting_type['value'].'"'.($order_values_type == $sorting_type['value'] ? ' selected' : '').'>'.$sorting_type['name'].'</option>';
woocommerce-filters.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Advanced AJAX Product Filters for WooCommerce
4
  * Plugin URI: https://wordpress.org/plugins/woocommerce-ajax-filters/?utm_source=free_plugin&utm_medium=plugins&utm_campaign=ajax_filters
5
  * Description: Unlimited AJAX products filters to make your shop perfect
6
- * Version: 1.5.5.1
7
  * Author: BeRocket
8
  * Requires at least: 5.0
9
  * Author URI: https://berocket.com?utm_source=free_plugin&utm_medium=plugins&utm_campaign=ajax_filters
@@ -11,6 +11,6 @@
11
  * Domain Path: /languages/
12
  * WC tested up to: 5.6
13
  */
14
- define( "BeRocket_AJAX_filters_version", '1.5.5.1' );
15
  define( "BeRocket_AJAX_filters_file", __FILE__ );
16
  include_once('main.php');
3
  * Plugin Name: Advanced AJAX Product Filters for WooCommerce
4
  * Plugin URI: https://wordpress.org/plugins/woocommerce-ajax-filters/?utm_source=free_plugin&utm_medium=plugins&utm_campaign=ajax_filters
5
  * Description: Unlimited AJAX products filters to make your shop perfect
6
+ * Version: 1.5.5.2
7
  * Author: BeRocket
8
  * Requires at least: 5.0
9
  * Author URI: https://berocket.com?utm_source=free_plugin&utm_medium=plugins&utm_campaign=ajax_filters
11
  * Domain Path: /languages/
12
  * WC tested up to: 5.6
13
  */
14
+ define( "BeRocket_AJAX_filters_version", '1.5.5.2' );
15
  define( "BeRocket_AJAX_filters_file", __FILE__ );
16
  include_once('main.php');