function custom_attribute_label( $label, $name, $product ) {
$taxonomy = 'pa_'.$name;
if( $taxonomy == 'pa_alk' )
$label .= '<span class="custom-label"> vol.%</span>';
return $label;}
add_filter( 'woocommerce_attribute_label', 'custom_attribute_label', 10, 3 );
Unfortunately this does not generate any output on frontend.
Any ideas and/or feedback to solve/tweak this are appreciated!
Example Attribute:
Full Time Student? Yes or No (options)
The product pages show the attribute tiles just fine, but then the cart page and order e-mail pages look like this:
Professional Development Meeting (PDM) – September – Yes
As you can see the product name shows and the attribute option shows. But it does not show the Attribute Title which might confuse clients. I would like for my clients to see this:
Professional Development Meeting (PDM) – September
Full Time Student? Yes
Settings:
WooCommerce v3.2.6
Variable Products
Attributes: Custom product attribute
Can someone please explain how I can get the attribute label in to show as well?
]]>Example Attribute:
Full Time Student? Yes or No (options)
The product pages show the attribute tiles just fine, but then the cart page and order e-mail pages look like this:
Professional Development Meeting (PDM) – September – Yes
As you can see the product name shows and the attribute option shows. But it does not show the Attribute Title which might confuse clients. I would like for my clients to see this:
Professional Development Meeting (PDM) – September
Full Time Student? Yes
Settings:
WooCommerce v3.2.6
Variable Products
Attributes: Custom product attribute
Can someone please explain how I can get the attribute label in to show as well?
]]>Does anyone know the rest of the code for the “look” – like color, size, etc. in my Firebug it shows but not sure its right to copy/paste that into css section to adjust. Or can someone let me know if it is?
THANKS FOR BEING HERE!
]]>fatal error: call to undefined function wc_attribute_label() in /home/mhd-01/www.mydomain.com/htdocs/wp/wp-content/themes/virtue/woocommerce/single-product/add-to-cart/variable.php on line 23
I tried to return to the precedent version I was using (2.0.0) and all is ok again.
What’s the issue and how can I resolve it?
Thank you.
]]>