display attribute name
-
Hi,
I would like to display the product attribute instead of the name if variation exist in cart, checkout and emails sent,
So, in cart.php I identify :
if ( ! $product_permalink ) {
echo apply_filters( ‘woocommerce_cart_item_name’, $_product->get_title(), $cart_item, $cart_item_key ) . ‘ ‘;
} else {
echo apply_filters( ‘woocommerce_cart_item_name’, sprintf( ‘%s‘, esc_url( $product_permalink ), $_product->get_title() ), $cart_item, $cart_item_key );
}And I print the attributes :
$attributes = $_product->get_attributes();
print_r($attributes);but it gives me the array with [pa_couleurs], but I can’t find how to print the attribute name,
Can anyone help me please ?
Thanks in advance,
- The topic ‘display attribute name’ is closed to new replies.