Bugfix/#22821: Add Fix for Warning and Notices on save attribute button click
This commit is contained in:
parent
8f2efbfef3
commit
f741d507ba
|
@ -632,7 +632,7 @@ class WC_AJAX {
|
|||
ob_start();
|
||||
$attributes = $product->get_attributes( 'edit' );
|
||||
$i = -1;
|
||||
|
||||
if( isset( $data['attribute_names'] ) && !empty( $data['attribute_names'] ) ){
|
||||
foreach ( $data['attribute_names'] as $attribute_name ) {
|
||||
$attribute = isset( $attributes[ sanitize_title( $attribute_name ) ] ) ? $attributes[ sanitize_title( $attribute_name ) ] : false;
|
||||
if ( ! $attribute ) {
|
||||
|
@ -648,6 +648,7 @@ class WC_AJAX {
|
|||
|
||||
include( 'admin/meta-boxes/views/html-product-attribute.php' );
|
||||
}
|
||||
}
|
||||
|
||||
$response['html'] = ob_get_clean();
|
||||
} catch ( Exception $e ) {
|
||||
|
|
Loading…
Reference in New Issue