Clean the SKU, prevents variations breaking when " was saved
@coenjacobs / me for .15
This commit is contained in:
parent
cc397a89d5
commit
dc6574b9e9
|
@ -968,8 +968,8 @@ class WC_Meta_Box_Product_Data {
|
|||
wp_set_object_terms( $post_id, $product_shipping_class, 'product_shipping_class');
|
||||
|
||||
// Unique SKU
|
||||
$sku = get_post_meta($post_id, '_sku', true);
|
||||
$new_sku = esc_html( trim( stripslashes( $_POST['_sku'] ) ) );
|
||||
$sku = get_post_meta( $post_id, '_sku', true );
|
||||
$new_sku = woocommerce_clean( stripslashes( $_POST['_sku'] ) );
|
||||
|
||||
if ( $new_sku == '' ) {
|
||||
update_post_meta( $post_id, '_sku', '' );
|
||||
|
|
Loading…
Reference in New Issue