Skip Navigation

[Closed] How to use custom field from “Toolset WooCommerce” as Custom Search Fillter?

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 3 replies, has 1 voice.

Last updated by Christopher Amirian 1 month, 2 weeks ago.

Assisted by: Christopher Amirian.

Author
Posts
#2805134
toolset-custom-search-filter-stock.png

I want to use "_stock" for a filter on a search page. But when I chose a "Custom Search Filer", I can see a lot of custom fields, but not this one.

I used this documentation and it works fine except for the stock filter:
https://toolset.com/course-lesson/creating-a-custom-search/

You can find the other working filters beneath the map/radius search (WCFM):
hidden link

#2805265

Christopher Amirian
Supporter

Languages: English (English )

Hi,

Welcome to Toolset support. The _stock field is a protected custom field used internally by WooCommerce to manage product stock quantities. In WordPress, custom fields prefixed with an underscore (e.g., _stock) are considered hidden or protected. As a result, Toolset's interface does not display these fields in the list of available custom fields for filters.​

To make this work on Toolset please do as follows:

https://toolset.com/course-lesson/using-third-party-hidden-fields/

Thanks.

#2805760

Thanks, Christopher!

I followed the instructions, but "_stock" is still not visible, when I add a Custom Search Filter. Is there anything also to be done to use a protected custom field?

Regards,
Jens

#2805781

Christopher Amirian
Supporter

Languages: English (English )

Hi Jens,

If you go to Toolset > Custom Fields do you see the automatically generated field group "Toolset WooCommerce", which can view but not change, that includes many WC fields, including the stock quantity (_stock).

They should all be accessible in the UI for filters etc.

If you could not fins, I'd appreciate it if you could give me the URL/User/Pass of your WordPress dashboard after you make sure that you have a backup of your website.
It is absolutely important that you give us a guarantee that you have a backup so if something happens you will have a point of restore.

Make sure you set the next reply as private.

The topic ‘[Closed] How to use custom field from “Toolset WooCommerce” as Custom Search Fillter?’ is closed to new replies.