Check if product_type query arg is set before using
This commit is contained in:
parent
479c4ed0eb
commit
144606f1fb
|
@ -611,7 +611,7 @@ class WC_AJAX {
|
|||
wp_die( -1 );
|
||||
}
|
||||
|
||||
$product_type = sanitize_text_field( wp_unslash( $_POST['product_type'] ) );
|
||||
$product_type = isset( $_POST['product_type'] ) ? sanitize_text_field( wp_unslash( $_POST['product_type'] ) ) : 'simple';
|
||||
|
||||
$i = absint( $_POST['i'] );
|
||||
$metabox_class = array();
|
||||
|
|
Loading…
Reference in New Issue