File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -381,7 +381,7 @@ public function entry_post_save( $lead, $form ) {
381381 }
382382
383383 if ( array_key_exists ( 'quantity ' , $ product ) ) {
384- $ line ->set_quantity ( intval ( $ product ['quantity ' ] ) );
384+ $ line ->set_quantity ( Number:: from_mixed ( $ product ['quantity ' ] ) );
385385 }
386386
387387 if ( array_key_exists ( 'options ' , $ product ) && is_array ( $ product ['options ' ] ) ) {
@@ -400,7 +400,7 @@ public function entry_post_save( $lead, $form ) {
400400 }
401401
402402 // Quantity.
403- $ line ->set_quantity ( null === $ product_quantity ? 1 : $ product_quantity );
403+ $ line ->set_quantity ( $ product_quantity ?? new Number ( 1 ) );
404404
405405 // Price.
406406 if ( array_key_exists ( 'price ' , $ option ) ) {
@@ -435,7 +435,7 @@ public function entry_post_save( $lead, $form ) {
435435 $ line = $ payment ->lines ->new_line ();
436436
437437 $ line ->set_type ( PaymentLineType::SHIPPING );
438- $ line ->set_quantity ( 1 );
438+ $ line ->set_quantity ( new Number ( 1 ) );
439439
440440 if ( array_key_exists ( 'id ' , $ shipping ) ) {
441441 $ line ->set_id ( $ shipping ['id ' ] );
You can’t perform that action at this time.
0 commit comments