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

Help with hiding out of stock 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! I have some products with some color attributes, but there are no active variations for them. In other words, they are out of stock.

I want to know if there is any way in which i can hide those products that doesn't have an active variation while filtering that attribute.

 

PD: I found this code, but i pasted it in some places an didn't work:

add_filter('woof_get_request_data', 'my_woof_get_request_data');

function my_woof_get_request_data($data){
$data['stock']='instock';
return $data;
}

 

Where do i have to paste it?

Hello

In this case, the product or all variations must have the status out of stock

this code should be inserted into functions.php