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

Search by Shipping class

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.
Can I add the Shipping class field to the search?

Hello

Unfortunately, the plugin does not have such a feature

in /woocommerce-products-filter/index.php at line 1257 (in function get_taxonomies) there is this code

unset($taxonomies['product_shipping_class']);

I have disabled this code and product_shipping_class appear in Woocommerce > Settings > Product Filter > Structure with other taxonomies.

If I active this filter Dinamic recount works fine but no have effect on products showed

Please help me, is important!

Ok, i have partial resolved.

I need to add this snippet into child theme function.php file

add_action( 'woocommerce_product_query','woof_parse_query_custom');
function woof_parse_query_custom($wp_query){
if (!empty($wp_query->tax_query) AND isset($wp_query->tax_query->queries)) {
global $WOOF;
$request = $WOOF->get_request_data();
if(isset($request["product_shipping_class"])){
$tax_query = $wp_query->tax_query->queries;

$tax_query[]=array(
'taxonomy' => 'product_shipping_class',
'field' => 'slug',
'terms' => $request["product_shipping_class"],
'operator' => 'IN',
);
$wp_query->set('tax_query', $tax_query);
}
}
}

but is necessary that you add in a feature update a filter in

public function get_taxonomies() {
....
return $taxonomies; // <= add a filter here for adjust return value
}

Hello

Try to use  this  hook - woof_get_tax_query - https://products-filter.com/hook/woof_get_tax_query/

not works!

Hello

Drop  me  your  code and exact  link to  the  issue