No products in the cart.
Forum Replies Created
Viewing 1 post (of 1 total)
- AuthorPosts
-
November 27, 2019 at 2:23 am in reply to: Adding product attribute column to edit order page in Woocommerce #9454
sean-doherty
ParticipantThis worked for me:
add_action('woocommerce_admin_order_item_values', 'my_woocommerce_admin_order_item_values', 10, 3); function my_woocommerce_admin_order_item_values($_product, $item, $item_id = null) { $colour = get_the_terms( $_product->post->ID, 'pa_colour'); echo '<td>' . $colour[0]->name . '</td>'; }
Had to go down the route of taxonomy and not get_attribute(). Thanks to this post:
- AuthorPosts
Viewing 1 post (of 1 total)