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

HUSKY filter hooks for customization purpose

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 Pablo,

I have a question about the HUSKY filter hooks for some customization.

I am using some of the HUSKY filter hooks for customization purpose but those don't seem to work.

website: https://woocommerce-486994-3519771.cloudwaysapps.com

Plugins i'm using are:

BETHEME 20.0.2

https://themeforest.net/item/betheme-responsive-multipurpose-wordpress-theme/7758048

WPCE - Woocommerce parts compatibility Editor

https://codecanyon.net/item/wpce-woocommerce-parts-compatibility-editor/24115209

This is the code I have placed in my child theme based file:

function wpce_woof_search_query ( $query ) {
	echo"Welcome!"; exit;
}
add_filter ( 'woof_dynamic_count_attr', 'wpce_woof_search_query', 99 );
add_filter ( 'woof_products_query', 'wpce_woof_search_query', 99 );

This code should stop the WOOF plugin to perform a search and should show a message saying"Welcome!". But it doesn't do this.

That's the page where I was expecting this result:
https://woocommerce-486994-3519771.cloudwaysapps.com/shop?swoof=1&product_cat=engine-oil-and-additives

Thanks in advance!

Hello

Please  read  docs - https://products-filter.com/hook/woof_products_query  - hook works for this shortcode -  [woof_products]

For other templates, the plugin uses - 'parse_query'

Hi Pablo!

Thanks for your quick and valuable response, the 'parse_query did the trick for me :) However, I am still facing issues with the count against each of the attributes. I have tried the 'woof_dynamic_count_attr' as well with no success.

Hello

Ok! Please give me your custom code I will check it

Nothing fancy yet, written following simple code snippet in my child theme's functions.php file and your plugin doesn't go within this script at all:
function wpce_woof_filters_count ( $query ) {
	print_r( $query); exit;
}
add_filter ( 'woof_dynamic_count_attr', 'wpce_woof_filters_count', 99 );

Hello

Did you enable dynamic counting - https://share.pluginus.net/image/i20230530131437.png

 

That worked, thank you! :)

Hello

Great! Welcome;)