empty check

This commit is contained in:
ratulhasan 2021-10-22 11:01:39 +06:00 committed by barryhughes
parent 3b4168dcbc
commit 12719616d9
1 changed files with 1 additions and 1 deletions

View File

@ -928,7 +928,7 @@ class WC_Admin_Post_Types {
return false;
}
$old_price = ( $product->{"get_{$price_type}_price"}() === '' ) ? 0 : $product->{"get_{$price_type}_price"}();
$old_price = empty( $product->{"get_{$price_type}_price"}() ) ? 0 : $product->{"get_{$price_type}_price"}();
$price_changed = false;
$change_price = absint( $request_data[ "change_{$price_type}_price" ] );