Check if product_type query arg is set before using

This commit is contained in:
Matt Sherman 2023-07-31 19:10:36 -04:00
parent 479c4ed0eb
commit 144606f1fb
1 changed files with 1 additions and 1 deletions

View File

@ -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();