Skip Navigation

[Resolved] Filter by Product Dimensions (WooCommerce Views filter fields)

This support ticket is created 6 years, 7 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.

Our next available supporter will start replying to tickets in about 8.15 hours from now. Thank you for your understanding.

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 1 reply, has 2 voices.

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

Assisted by: Luo Yang.

Author
Posts
#729856

I'm creating a simple filter form. I can't seem to figure out how to filter by WooCommerce product dimensions, located in the Shipping tab and accessible in php with $product->get_dimensions().

It looks like only three fields are available. Must I duplicate the dimensions as custom fields onto the Product Post to make them filterable?

#731443

Hello,

The Woocommerce plugin is using hidden custom fields to store the product dimensions values:
_width
_height
_length

You can reveal them in Views UI by this:
Dashboard-> Toolset-> Settings-> Front-end Content
in section "Hidden custom fields", click button "Select custom fields", enable above three custom fields, and test again.

More help:
https://toolset.com/documentation/user-guides/using-third-party-hidden-fields/