ID Status Date Product
#18330443 Closed WooCommerce Product Filter
JAC Box

Hi,

  1. I would like to filter stock by the number of stock available.

eg.  If I have 5 units or 10 units then only items with 5 or more units in stock should show.

2) A radio button on the front end to filter in stock and out of stock items.

Farhad Ahmadi

Hi,

As you know WooCommerce saves the number of stock available in the products meta field and its name is _stock.

You can use the plugin Product Filter by Custom Meta to filter stock or other kinds of post custom meta fields.

But you should note that by default products don’t have stock numbers and it activates when you  check to Manage Stock checkbox option in the product edit page.

Hiding out of stock items can be done using different methods such as setting minimum number of the above filter to 1 or open WooCommerce settings > Products > Hide out of stock items from the catalog

Thanks.

Write a reply

The ticket has been closed. If you feel that your issue has not been solved yet or something new came up in relation to this ticket, you can re-open it by clicking this link.