wc_product_force_unique_sku edit context
This commit is contained in:
parent
f9b17ea681
commit
6bc97dce91
|
@ -556,7 +556,7 @@ function wc_product_force_unique_sku( $product_id ) {
|
||||||
|
|
||||||
if ( $product ) {
|
if ( $product ) {
|
||||||
try {
|
try {
|
||||||
$current_sku = $product->get_sku();
|
$current_sku = $product->get_sku( 'edit' );
|
||||||
$new_sku = wc_product_generate_unique_sku( $product_id, $current_sku );
|
$new_sku = wc_product_generate_unique_sku( $product_id, $current_sku );
|
||||||
|
|
||||||
if ( $current_sku !== $new_sku ) {
|
if ( $current_sku !== $new_sku ) {
|
||||||
|
|
Loading…
Reference in New Issue