Pass false for product in attribute label filter

Closes #10773
This commit is contained in:
Mike Jolley 2016-04-25 14:11:07 +01:00
parent 87dc31ffac
commit 6f42514afb
2 changed files with 2 additions and 2 deletions

View File

@ -462,7 +462,7 @@ class WC_Meta_Box_Product_Data {
$metabox_class[] = $taxonomy;
$attribute_label = wc_attribute_label( $taxonomy );
} else {
$attribute_label = apply_filters( 'woocommerce_attribute_label', $attribute['name'], $attribute['name'] );
$attribute_label = apply_filters( 'woocommerce_attribute_label', $attribute['name'], $attribute['name'], false );
}
include( 'views/html-product-attribute.php' );

View File

@ -33,7 +33,7 @@
$meta['meta_key'] = wc_attribute_label( wc_sanitize_taxonomy_name( $meta['meta_key'] ) );
$meta['meta_value'] = isset( $term->name ) ? $term->name : $meta['meta_value'];
} else {
$meta['meta_key'] = apply_filters( 'woocommerce_attribute_label', wc_attribute_label( $meta['meta_key'], $_product ), $meta['meta_key'] );
$meta['meta_key'] = apply_filters( 'woocommerce_attribute_label', wc_attribute_label( $meta['meta_key'], $_product ), $meta['meta_key'], false );
}
echo '<tr><th>' . wp_kses_post( rawurldecode( $meta['meta_key'] ) ) . ':</th><td>' . wp_kses_post( wpautop( make_clickable( rawurldecode( $meta['meta_value'] ) ) ) ) . '</td></tr>';