Added safeguard check for shipping methods post data

This commit is contained in:
Diego Zanella 2016-04-20 10:21:28 +01:00
parent 2c26fd5b02
commit 531f644f5f
1 changed files with 3 additions and 1 deletions

View File

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