Quote from Pablo Borysenco on August 1, 2019, 11:53
Hello
You need to make changes to the js file.
file: path/to/domain/wp-content/plugins/woocommerce-products-filter/js/front.js
1. Finde function woof_init_toggles() and comment it.
2. Then add this function after the previous comment function:
function woof_init_toggles() {
jQuery('.woof_container_inner h4').life('click', function () {
if (jQuery(this).children().data('condition') == 'opened') {
jQuery(this).children().removeClass('woof_front_toggle_opened');
jQuery(this).children().addClass('woof_front_toggle_closed');
jQuery(this).children().data('condition', 'closed');
if (woof_toggle_type == 'text') {
jQuery(this).children().text(woof_toggle_closed_text);
} else {
jQuery(this).children().find('img').prop('src', woof_toggle_closed_image);
}
} else {
jQuery(this).children().addClass('woof_front_toggle_opened');
jQuery(this).children().removeClass('woof_front_toggle_closed');
jQuery(this).children().data('condition', 'opened');
if (woof_toggle_type == 'text') {
jQuery(this).children().text(woof_toggle_opened_text);
} else {
jQuery(this).children().find('img').prop('src', woof_toggle_opened_image);
}
}
jQuery(this).parent().find('.woof_block_html_items').
toggle(500);
return false;
});
}
If you use something to optimize the js, rebuild the js file.
Hello
You need to make changes to the js file.
file: path/to/domain/wp-content/plugins/woocommerce-products-filter/js/front.js
1. Finde function woof_init_toggles() and comment it.
2. Then add this function after the previous comment function:
function woof_init_toggles() {
jQuery('.woof_container_inner h4').life('click', function () {
if (jQuery(this).children().data('condition') == 'opened') {
jQuery(this).children().removeClass('woof_front_toggle_opened');
jQuery(this).children().addClass('woof_front_toggle_closed');
jQuery(this).children().data('condition', 'closed');
if (woof_toggle_type == 'text') {
jQuery(this).children().text(woof_toggle_closed_text);
} else {
jQuery(this).children().find('img').prop('src', woof_toggle_closed_image);
}
} else {
jQuery(this).children().addClass('woof_front_toggle_opened');
jQuery(this).children().removeClass('woof_front_toggle_closed');
jQuery(this).children().data('condition', 'opened');
if (woof_toggle_type == 'text') {
jQuery(this).children().text(woof_toggle_opened_text);
} else {
jQuery(this).children().find('img').prop('src', woof_toggle_opened_image);
}
}
jQuery(this).parent().find('.woof_block_html_items').
toggle(500);
return false;
});
}
If you use something to optimize the js, rebuild the js file.