Fix {$taxonomy}_pre_add_form hook for attributes

previous {$taxonomy}_pre_add_form hook inside of wc_get_attribute_taxonomies() loop was not written to work with the results of wc_get_attribute_taxonomies()
This commit is contained in:
Leon Francis Shelhamer 2016-05-29 17:57:10 -04:00
parent 78ca4a2e74
commit 1e5785da3f
1 changed files with 2 additions and 2 deletions

View File

@ -42,8 +42,8 @@ class WC_Admin_Taxonomies {
$attribute_taxonomies = wc_get_attribute_taxonomies();
if ( $attribute_taxonomies ) {
foreach ( array_keys( $attribute_taxonomies ) as $attribute ) {
add_action( $attribute . '_pre_add_form', array( $this, 'product_attribute_description' ) );
foreach ( $attribute_taxonomies as $attribute ) {
add_action( 'pa_' . $attribute->attribute_name . '_pre_add_form', array( $this, 'product_attribute_description' ) );
}
}