How to get the value of an attribute from a variation?
For a plugin I am creating, I add 2 attributes to a variation. One is specific for the variation, the other is not (any value). When I try to get the values from the variation (after customer has selected them), I do get a value for the specific attribute but not for the global one. add_filter( 'woocommerce_get_price_html', 'bbloomer_alter_price_display', 9999, 2 ); function bbloomer_alter_price_display( $price, $product ) { if ( $product->is_type( 'simple' ) || $product->is_type( 'variation' ) ) { $attributes = wc_get_product_variation_attributes($product->get_id()); error_log(print_r($attrib
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.