Attribute post data needs stripslashes
This commit is contained in:
parent
2843f1d6e1
commit
a0aa663f29
|
@ -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'] ) ) {
|
||||
|
|
|
@ -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'] );
|
||||
|
|
Loading…
Reference in New Issue