Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function acme_wc_attributes() {
- global $product;
- echo "<pre>";
- foreach( $product->get_attributes() as $attr ) {
- printf(
- "%s: %s" . PHP_EOL,
- wc_attribute_label( $attr->get_name() ),
- implode( ', ', $attr->get_options() )
- );
- }
- echo "</pre>";
- }
- add_action( 'woocommerce_after_single_product', 'acme_wc_attributes' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement