Merge pull request #31012 from RatulHasan/fix/unsupported_operand_types
Fix/unsupported operand types
This commit is contained in:
commit
a761cb8ebc
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: tweak
|
||||||
|
|
||||||
|
Avoid unsupported operand type errors from within `WC_Admin_Post_Types::set_new_price()`.
|
|
@ -928,7 +928,7 @@ class WC_Admin_Post_Types {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$old_price = $product->{"get_{$price_type}_price"}();
|
$old_price = (float) $product->{"get_{$price_type}_price"}();
|
||||||
$price_changed = false;
|
$price_changed = false;
|
||||||
|
|
||||||
$change_price = absint( $request_data[ "change_{$price_type}_price" ] );
|
$change_price = absint( $request_data[ "change_{$price_type}_price" ] );
|
||||||
|
|
Loading…
Reference in New Issue