Fix bulk sale price update (#37812)
This commit is contained in:
commit
afe226d573
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
|
||||
Added numeric check for Regular price in bulk edits.
|
|
@ -985,7 +985,7 @@ class WC_Admin_Post_Types {
|
|||
break;
|
||||
}
|
||||
$regular_price = $product->get_regular_price();
|
||||
if ( $is_percentage ) {
|
||||
if ( $is_percentage && is_numeric( $regular_price ) ) {
|
||||
$percent = $price / 100;
|
||||
$new_price = max( 0, $regular_price - ( NumberUtil::round( $regular_price * $percent, wc_get_price_decimals() ) ) );
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue