esc html sku
This commit is contained in:
parent
bb741395fa
commit
ced19c9421
|
@ -673,7 +673,7 @@ function process_product_meta_variable( $post_id ) {
|
|||
endif;
|
||||
|
||||
// Update post meta
|
||||
update_post_meta( $variation_id, '_sku', $variable_sku[$i] );
|
||||
update_post_meta( $variation_id, '_sku', esc_html( $variable_sku[$i] ) );
|
||||
update_post_meta( $variation_id, '_price', $variable_price[$i] );
|
||||
update_post_meta( $variation_id, '_sale_price', $variable_sale_price[$i] );
|
||||
update_post_meta( $variation_id, '_weight', $variable_weight[$i] );
|
||||
|
|
|
@ -509,7 +509,7 @@ function woocommerce_process_product_meta( $post_id, $post ) {
|
|||
|
||||
// Unique SKU
|
||||
$sku = get_post_meta($post_id, '_sku', true);
|
||||
$new_sku = stripslashes( $_POST['_sku'] );
|
||||
$new_sku = esc_html(stripslashes( $_POST['_sku'] ));
|
||||
if ($new_sku!==$sku) :
|
||||
if ($new_sku && !empty($new_sku)) :
|
||||
if (
|
||||
|
|
Loading…
Reference in New Issue