# Making a product in-stock & out of stock filter

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:

![](https://wp-dreams.com/wp-content/uploads/2017/09/21/admin/14821/admin/woocommerce-stock-filter-min.png)

..this will result in:

![](https://wp-dreams.com/wp-content/uploads/2017/09/21/admin/14821/admin/woocommerce-stock-filter-2.png)

## 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:

  ```
  ||Any value**
  instock||In stock
  outofstock||Out of stock
  ```

For more information about custom field filters please visit the [Custom Field Filters](https://documentation.ajaxsearchpro.com/frontend-search-settings/custom-field-selectors) documentation.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://knowledgebase.ajaxsearchpro.com/miscellaneous/woocommerce/making-a-product-in-stock-and-out-of-stock-filter.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
