Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // WooCommerce - product-attribute.php for html attribute
- if( 'attribute_with html_name' == $product_attribute['label'] ) {
- $product_id = $product->get_id();
- $ats = get_post_meta( $product_id, '_product_attributes', true );
- foreach( $ats as $at ) {
- if( 'attribute_with html_name' == $at['name'] ) {
- $product_attribute['value'] = html_entity_decode( $at['value'], ENT_COMPAT | ENT_HTML5 );
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement