Skip Navigation

[Resolved] Filter by stock number

This thread is resolved. Here is a description of the problem and solution.

Problem:

I am trying to find out if its possible to filter by woocommerce stock number?

Solution:

The woocommerce SKU field is a hidden field using filed slug "_sku", you can enable it in Views UI:
Dashboard-> Toolset-> Settings-> Front-end Content
option "Hidden custom fields", click button "Select custom fields", find and enable the "_sku" field

Then you will be able to add filter on "_sku" field in view within Views UI

Relevant Documentation:

This support ticket is created 6 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by Luo Yang 6 years, 5 months ago.

Assisted by: Luo Yang.

Author
Posts
#920010

I am trying to find out if its possible to filter by woocommerce stock number?
For example if "_stock" lte 10 = show results
Is it possible?

#920148

Hello,

I assume we are talking about the SKU field, this is a hidden field using filed slug "_sku", you can enable it in Views UI:
Dashboard-> Toolset-> Settings-> Front-end Content
option "Hidden custom fields", click button "Select custom fields", find and enable the "_sku" field

Then you will be able to add filter on "_sku" field in view within Views UI

#920591

Daaaamn!!! you solved this problem and many other problems by answering this Luo. I didnt know that Toolset support filters of third party plugins, i was thinking only the 3 basic WooCommerce filters price, sale status, stock status are available!! but now it looks like ALL WooCommerce fields can be used in Views Search. AWESOME TOOLSET! Many Thanks

#920609

You are welcome