Doesn’t work properly with Product Filter plg
-
Hey,
Your plugin is great, but doesn’t work properly with plugin:
https://codecanyon.net/item/woocommerce-product-filter/8514038After changing any of filter – I’ve got redirect from /sale/ to /shop/ page and ‘Adoptive filter’ (to show only available filter from queried products) doesn’t work – always is showed all available filters.
I understand, that it is 3rd part plugin, but will be great if is possible to fix that.Also, was a problem if I use any of filter – sale query broke. So I’ve fix by adding in /lib/js/prdctfltr_main.js
if ( obj.find('.prdctfltr_buttons input[name="sale_products"]:checked').length > 0 ) {
to
if ( obj.find('.prdctfltr_buttons input[name="sale_products"]:checked').length > 0 || $('body').hasClass('woocommerce-onsale') ) {
And add in functions.php:
function onsale_body_class( $classes ) { global $wp_query; if (isset($wp_query->is_sale_page) && $wp_query->is_sale_page) { $classes[] = 'woocommerce-onsale'; } return $classes; } add_filter('body_class', 'onsale_body_class');
- The topic ‘Doesn’t work properly with Product Filter plg’ is closed to new replies.