Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'woocommerce_after_shop_loop_item', 'display_size_attribute', 5 );
- function display_size_attribute() {
- global $product;
- if ( $product->is_type('variable') ) {
- $taxonomy = 'pa_color';
- echo '<span class="attribute-size">' . $product->get_attribute($taxonomy) . '</span>';
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement