Added safeguard check for shipping methods post data
This commit is contained in:
parent
2c26fd5b02
commit
531f644f5f
|
@ -3256,7 +3256,9 @@ class WC_AJAX {
|
|||
$shipping_method = WC_Shipping_Zones::get_shipping_method( $instance_id );
|
||||
//$data = $_POST['data'];
|
||||
|
||||
$shipping_method->set_post_data( $_POST['data'] );
|
||||
if( isset( $_POST['data'] ) ) {
|
||||
$shipping_method->set_post_data( $_POST['data'] );
|
||||
}
|
||||
$shipping_method->process_admin_options();
|
||||
|
||||
wp_send_json_success( array(
|
||||
|
|
Loading…
Reference in New Issue