PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

[woof_price_slider_html] filter hook not working

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

Hi,

I want to modify the html structure of the price filter and i've tried using the [woof_price_slider_html] filter hook from the Codex but it's not working. I've tried it with all slider types - text, ion and native woo slider etc., but it doesn't seem like it's being used.

Could you please let me know how i can modify the html structure of the price slider?

Hello

this only works for native woo slide - https://c2n.me/4gSWzg3.png

Give me your custom code. Where did you add this code?

An  example:

add_filter('woof_price_slider_html', function($price_slider_html, $price_slider_data){

return"Your  HTML!";
},10,2);

Hi,

By native woo slide do you mean this?

I've placed the code exactly like you've written it in my child themes' functions.php file.

I was wondering if this hook is being used at all because in the plugin code at the top of the function where this fillter is applied there is a comment saying "don't use it".

Hello

What plugin version number are you using?

In the latest version this hook will not work

You can customize the filter template by price only in the file - wp-content\plugins\woocommerce-products-filter\classes\helper.php -  https://share.pluginus.net/image/i20221018082237.png

Hello

Yes I believe i am using latest version - 3.3.0.

Do you mean i should modify the price filter function directly from your plugin files? Wouldn't my changes be wiped off with the next plugin update? Or do you mean that currently there is no way of safely modifying this filter template?

Please paste your license key here - https://share.pluginus.net/image/i20210618130558.png -> https://share.pluginus.net/image/i20210618130614.png

after every update you should change this code

Unfortunately, due to new wordpress requirements, we were forced to remove the ability to change the filter template by price

with minimal code changes:

in  file  - \wp-content\plugins\woocommerce-products-filter\views\woof.php - change this  code - https://c2n.me/4gTAF8l.png to https://share.pluginus.net/image/i20221018094635.png

<?php echo WOOF_HELPER::price_filter($additional_taxes, $min_pf, $max_pf); ?>

In this case the hook 'woof_price_slider_html' will work