This commit is contained in:
Mike Jolley 2012-06-05 23:54:38 +01:00
parent 98d5f4d4a2
commit ed4067dee9
1 changed files with 2 additions and 2 deletions

View File

@ -568,8 +568,8 @@ function woocommerce_process_product_meta( $post_id, $post ) {
// Unique SKU
$sku = get_post_meta($post_id, '_sku', true);
$new_sku = esc_html(stripslashes( $_POST['_sku'] ));
if ($new_sku=='') :
$new_sku = esc_html( trim( stripslashes( $_POST['_sku'] ) ) );
if ( $new_sku == '' ) :
update_post_meta( $post_id, '_sku', '' );
elseif ($new_sku!==$sku) :
if ($new_sku && !empty($new_sku)) :