Making a product in-stock & out of stock filter
WooCommerce product stock filter tutorial
Product stock status in WooCommerce is stored in the _stock_status private custom field, which can have two values: instock and outofstock
On the search instance Frontend Search Settings -> Custom field filters panel you can easily make a filter on this field:
..this will result in:
![](https://knowledgebase.ajaxsearchpro.com/~gitbook/image?url=https%3A%2F%2Fwp-dreams.com%2Fwp-content%2Fuploads%2F2017%2F09%2F21%2Fadmin%2F14821%2Fadmin%2Fwoocommerce-stock-filter-2.png&width=768&dpr=4&quality=100&sign=e752da51&sv=1)
Detailed Instructions
To the Custom Field input enter: _stock_status
In this example I use the Radio type, but Checkboxes or Drop-down is just as good
To the values textarea enter:
For more information about custom field filters please visit the Custom Field Filters documentation.
Last updated