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

meta filter for products variations

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,

Have you any plan, if and when will meta filter support also products variations?

I really need it.

Is there any way, how to enable / program this feature by my own ? I need it for one meta attribute only.

Regards,

Hello

Unfortunately at the moment we do not have such a task

But I will pass it to the developers

rogram this feature by my own ? - it is a lot of work. But if you have programming experience I can give you a concept

Oh, I will need to change my filter then.

I have little programming experience and I have programmer, who should do that. If you can give me a concept a will appreciate it. I will look if it is worth it.

Hello

Ok!

1 To add a search query use the hook - 'posts_where'

2 to create  search  query:

Track if there is metadata in $ _GET

Do search :

$args = array(
'nopaging' => true,
'suppress_filters' => true,
'post_status' => 'publish',
'post_type' => array('product_variation'),
'meta_query' => $meta_query
);

$query = new WP_Query($args);

Add  products  ids   to  where

$where .=" AND $wpdb->posts.ID  IN($product_ids)";