Attribute post data needs stripslashes

This commit is contained in:
Mike Jolley 2019-01-08 13:25:27 +00:00
parent 2843f1d6e1
commit a0aa663f29
2 changed files with 2 additions and 2 deletions

View File

@ -228,7 +228,7 @@ class WC_Meta_Box_Product_Data {
$attributes = array();
if ( ! $data ) {
$data = $_POST;
$data = stripslashes_deep( $_POST );
}
if ( isset( $data['attribute_names'], $data['attribute_values'] ) ) {

View File

@ -615,7 +615,7 @@ class WC_AJAX {
$response = array();
try {
parse_str( $_POST['data'], $data );
parse_str( wp_unslash( $_POST['data'] ), $data );
$attributes = WC_Meta_Box_Product_Data::prepare_attributes( $data );
$product_id = absint( $_POST['post_id'] );