Attributes in Woocommerce
-
Hi,
Field shortcodes like _price and _lenghth work fine with [field _price] etc, but what about woocommerce attributes? I created an attribute with slug min_age. In Woocommerce the meta value is registered as pa_min_age.
When I use [field pa_min_age] or [field _pa_min_age] nothing is displayed. Did I missed setting? Or does this plugin does not support woocommerce attributes.
Thanks for you time and answer in advance.
Scholto
-
In addition to my question above. The attribute stores several variables such as 12-18 years, 18-25 years, 25 years and above.
So I think there must a way to execute the variable stored under this specific attribute.
May be the attribute is not a field but a taxonomy?
Hi Peter, thanks for your reply.
Taxonomy is “attributes”. Please see screenshot (scroll down) to see all registered post meta from one product post: https://screenshots.firefox.com/uvETax78vxY2A4Jr/www.finler.nl.
You can see meta key “pa_leeftijd”. It stores:
» name pa_leeftijd
» value
» position 8
» is_visible 1
» is_variation 1
» is_taxonomy 1is_variation refers to an age value. In this case 12-18 years.
Broke my head to show 12-18 years as text via shortcode. Can you give me a hint?
-
This reply was modified 7 years, 3 months ago by
Scholto Bos.
I tried:
[taxonomy _product_attributes field=pa_leeftijd]
Without results.
It has something to do with is_variation but still haven’t found to display text output.
Somebody a clue?
Did you try [taxonomy pa_leeftijd]?
Hi Peter,
That’s it. It works. Thanks for your time!
Happy Easter.
Scholtosolved.
-
This reply was modified 7 years, 3 months ago by
The topic ‘Attributes in Woocommerce’ is closed to new replies.