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:
parent
78ca4a2e74
commit
1e5785da3f
|
@ -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' ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue