Version Description
- Enhancement - Category condition in Filters ans Groups
- Fix - Replace widget with limitation by Categories
Download this release
Release Info
Developer | RazyRx |
Plugin | Advanced AJAX Product Filters |
Version | 1.3.0.1 |
Comparing to | |
See all releases |
Code changes from version 1.3 to 1.3.0.1
- assets/assets/screenshot-1.png +0 -0
- assets/assets/screenshot-2.png +0 -0
- assets/assets/screenshot-3.png +0 -0
- berocket/README.md +0 -30
- fixes/replace_widgets.php +35 -4
- includes/custom_post.php +2 -0
- readme.txt +5 -1
- woocommerce-filters.php +2 -2
assets/assets/screenshot-1.png
ADDED
Binary file
|
assets/assets/screenshot-2.png
ADDED
Binary file
|
assets/assets/screenshot-3.png
ADDED
Binary file
|
berocket/README.md
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
# README #
|
2 |
-
|
3 |
-
|
4 |
-
### Process of new plugin initialization ###
|
5 |
-
|
6 |
-
* Create plugin folder name (locally)
|
7 |
-
* In that folder create folder called `berocket`
|
8 |
-
* Clone repository into `berocket`
|
9 |
-
* Run this from the `berocket` folder `git update-index --assume-unchanged plugin.php` - We are telling git that we will not change this file and no sense to check it (but we will lol)
|
10 |
-
* Move `plugin.php` to the parent folder (plugin root)
|
11 |
-
* Rename and edit `plugin.php` as you need
|
12 |
-
* Create new repo on the bitbucket and clone it to the plugin root
|
13 |
-
* Create all needed folders(js, css, includes, etc) and files you need for the plugin.
|
14 |
-
* On change don't forget to commit
|
15 |
-
|
16 |
-
##### Don't edit Plugin Framework files from the plugin. OR at least commit asap because always there is a chance that you will forget to commit changes and we will have problems of merging #####
|
17 |
-
|
18 |
-
###### Plugin Framework would be as a sub-repository. Sub-repositories updating manually. So it will not provide issues while you still can update it when needed. ######
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
### Process of cloning plugin in process ###
|
23 |
-
|
24 |
-
* Create plugin folder name (locally)
|
25 |
-
* Clone repository
|
26 |
-
* In the plugin folder you will see folder `berocket`
|
27 |
-
* Clone into it this repo
|
28 |
-
* On change don't forget to commit
|
29 |
-
|
30 |
-
##### Don't edit Plugin Framework files from the plugin. OR at least commit asap because always there is a chance that you will forget to commit changes and we will have problems of merging #####
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fixes/replace_widgets.php
CHANGED
@@ -20,15 +20,47 @@ if( ! empty($old_filter_widgets) && is_array($old_filter_widgets) && count($old_
|
|
20 |
if( ! empty($filter_widget['show_page']) && is_array($filter_widget['show_page']) ) {
|
21 |
$filter_widget['data'] = array();
|
22 |
$i = 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
foreach($filter_widget['show_page'] as $show_page) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
$filter_widget['data'][$i] = array(
|
25 |
'1' => array(
|
26 |
'equal' => 'equal',
|
27 |
'type' => 'page',
|
28 |
-
'
|
29 |
),
|
30 |
);
|
31 |
-
if(
|
|
|
|
|
|
|
32 |
$cat_propagation = array();
|
33 |
foreach($filter_widget['product_cat'] as $product_cat) {
|
34 |
$product_cat = get_term_by('slug', $product_cat, 'product_cat');
|
@@ -38,12 +70,11 @@ if( ! empty($old_filter_widgets) && is_array($old_filter_widgets) && count($old_
|
|
38 |
}
|
39 |
$filter_widget['data'][$i]['2'] = array(
|
40 |
'equal' => 'equal',
|
41 |
-
'type' => '
|
42 |
'subcats' => ! empty($filter_widget['cat_propagation']),
|
43 |
'category' => $cat_propagation,
|
44 |
);
|
45 |
}
|
46 |
-
$i++;
|
47 |
}
|
48 |
}
|
49 |
if( empty($filter_widget['widget_collapse_disable']) ) {
|
20 |
if( ! empty($filter_widget['show_page']) && is_array($filter_widget['show_page']) ) {
|
21 |
$filter_widget['data'] = array();
|
22 |
$i = 1;
|
23 |
+
|
24 |
+
$compatibility_pages = array(
|
25 |
+
'product_cat' => 'category',
|
26 |
+
'product_taxonomy' => 'taxonomies',
|
27 |
+
'product_tag' => 'tags',
|
28 |
+
'single_product' => 'product',
|
29 |
+
);
|
30 |
+
$show_pages_fix = array();
|
31 |
+
$product_cat = false;
|
32 |
foreach($filter_widget['show_page'] as $show_page) {
|
33 |
+
if( isset($compatibility_pages[$show_page]) ) {
|
34 |
+
$show_page_fix = $compatibility_pages[$show_page];
|
35 |
+
} else {
|
36 |
+
$show_page_fix = $show_page;
|
37 |
+
}
|
38 |
+
if( $show_page_fix == 'category' ) {
|
39 |
+
$product_cat = true;
|
40 |
+
} else {
|
41 |
+
$show_pages_fix[] = $show_page_fix;
|
42 |
+
}
|
43 |
+
}
|
44 |
+
$filter_widget['data'][$i] = array(
|
45 |
+
'1' => array(
|
46 |
+
'equal' => 'equal',
|
47 |
+
'type' => 'page',
|
48 |
+
'pages' => $show_pages_fix,
|
49 |
+
),
|
50 |
+
);
|
51 |
+
if( $product_cat ) {
|
52 |
+
$i++;
|
53 |
$filter_widget['data'][$i] = array(
|
54 |
'1' => array(
|
55 |
'equal' => 'equal',
|
56 |
'type' => 'page',
|
57 |
+
'pages' => array('category'),
|
58 |
),
|
59 |
);
|
60 |
+
if( ! empty($filter_widget['product_cat']) && is_string($filter_widget['product_cat']) ) {
|
61 |
+
$filter_widget['product_cat'] = @ json_decode( $filter_widget['product_cat'] );
|
62 |
+
}
|
63 |
+
if( ! empty($filter_widget['product_cat']) && is_array($filter_widget['product_cat']) ) {
|
64 |
$cat_propagation = array();
|
65 |
foreach($filter_widget['product_cat'] as $product_cat) {
|
66 |
$product_cat = get_term_by('slug', $product_cat, 'product_cat');
|
70 |
}
|
71 |
$filter_widget['data'][$i]['2'] = array(
|
72 |
'equal' => 'equal',
|
73 |
+
'type' => 'woo_category',
|
74 |
'subcats' => ! empty($filter_widget['cat_propagation']),
|
75 |
'category' => $cat_propagation,
|
76 |
);
|
77 |
}
|
|
|
78 |
}
|
79 |
}
|
80 |
if( empty($filter_widget['widget_collapse_disable']) ) {
|
includes/custom_post.php
CHANGED
@@ -278,6 +278,7 @@ class BeRocket_AAPF_single_filter extends BeRocket_custom_post_class {
|
|
278 |
public function init_conditions() {
|
279 |
$this->conditions = new BeRocket_conditions_AAPF($this->post_name.'[data]', $this->hook_name, array(
|
280 |
'condition_page',
|
|
|
281 |
));
|
282 |
}
|
283 |
public function conditions($post) {
|
@@ -584,6 +585,7 @@ class BeRocket_AAPF_group_filters extends BeRocket_custom_post_class {
|
|
584 |
public function init_conditions() {
|
585 |
$this->conditions = new BeRocket_conditions_AAPF($this->post_name.'[data]', $this->hook_name, array(
|
586 |
'condition_page',
|
|
|
587 |
));
|
588 |
}
|
589 |
public function conditions($post) {
|
278 |
public function init_conditions() {
|
279 |
$this->conditions = new BeRocket_conditions_AAPF($this->post_name.'[data]', $this->hook_name, array(
|
280 |
'condition_page',
|
281 |
+
'condition_page_woo_category'
|
282 |
));
|
283 |
}
|
284 |
public function conditions($post) {
|
585 |
public function init_conditions() {
|
586 |
$this->conditions = new BeRocket_conditions_AAPF($this->post_name.'[data]', $this->hook_name, array(
|
587 |
'condition_page',
|
588 |
+
'condition_page_woo_category'
|
589 |
));
|
590 |
}
|
591 |
public function conditions($post) {
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Donate link: http://berocket.com/product/woocommerce-ajax-products-filter
|
|
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: 4.0
|
7 |
Tested up to: 5.0.3
|
8 |
-
Stable tag: 1.3
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -187,6 +187,10 @@ You can try this plugin's admin side [here](http://berocket.com/product/woocomme
|
|
187 |
|
188 |
== Changelog ==
|
189 |
|
|
|
|
|
|
|
|
|
190 |
= 1.3 =
|
191 |
* Enhancement - New admin settings design
|
192 |
* Enhancement - New filters post type and group with filters
|
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: 4.0
|
7 |
Tested up to: 5.0.3
|
8 |
+
Stable tag: 1.3.0.1
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
187 |
|
188 |
== Changelog ==
|
189 |
|
190 |
+
= 1.3.0.1 =
|
191 |
+
* Enhancement - Category condition in Filters ans Groups
|
192 |
+
* Fix - Replace widget with limitation by Categories
|
193 |
+
|
194 |
= 1.3 =
|
195 |
* Enhancement - New admin settings design
|
196 |
* Enhancement - New filters post type and group with filters
|
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/
|
5 |
* Description: Unlimited AJAX products filters to make your shop perfect
|
6 |
-
* Version: 1.3
|
7 |
* Author: BeRocket
|
8 |
* Requires at least: 4.0
|
9 |
* Author URI: http://berocket.com
|
@@ -13,6 +13,6 @@
|
|
13 |
* Domain Path: /languages/
|
14 |
* WC tested up to: 3.5.3
|
15 |
*/
|
16 |
-
define( "BeRocket_AJAX_filters_version", '1.3' );
|
17 |
define( "BeRocket_AJAX_filters_file", __FILE__ );
|
18 |
include_once('main.php');
|
3 |
* Plugin Name: Advanced AJAX Product Filters for WooCommerce
|
4 |
* Plugin URI: https://wordpress.org/plugins/woocommerce-ajax-filters/
|
5 |
* Description: Unlimited AJAX products filters to make your shop perfect
|
6 |
+
* Version: 1.3.0.1
|
7 |
* Author: BeRocket
|
8 |
* Requires at least: 4.0
|
9 |
* Author URI: http://berocket.com
|
13 |
* Domain Path: /languages/
|
14 |
* WC tested up to: 3.5.3
|
15 |
*/
|
16 |
+
define( "BeRocket_AJAX_filters_version", '1.3.0.1' );
|
17 |
define( "BeRocket_AJAX_filters_file", __FILE__ );
|
18 |
include_once('main.php');
|