I m working on content-product of woocommerce and doing shortcode in the template as echo do_shortcode ('[product_attribute attribute="Grams"]');
where Grams are in my backend as attribute and it hasvalues, but nothing get printed out.Is it a wrong query or i need to do something else?
1 comment
Comments are closed.
I may have found the problem (from product_attribute)
Notice the attibute is in single quotes wheras yours is in double quotes:
also you may need it to be in lowercase letters.
From The codex:
IMPORTANT TIP – Don’t use camelCase or UPPER-CASE for your $atts attribute names
$atts values are lower-cased during shortcode_atts( array( ‘attr_1’ => ‘attr_1 default’, // …etc ), $atts ) processing, so you might want to just use lower-case.