File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed
Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -330,4 +330,12 @@ public function calculateTaxes(): float
330330
331331 return $ this ->getTaxTotal ();
332332 }
333+
334+ /**
335+ * Calculate the discount.
336+ */
337+ public function calculateDiscount (): float
338+ {
339+ return 0.0 ;
340+ }
333341}
Original file line number Diff line number Diff line change @@ -320,7 +320,7 @@ public function calculateTaxes(): float
320320 {
321321 $ this ->taxes ()->detach ();
322322
323- $ taxes = TaxRate::proxy ()
323+ TaxRate::proxy ()
324324 ->newQuery ()
325325 ->applicableForShipping ()
326326 ->get ()
@@ -331,6 +331,14 @@ public function calculateTaxes(): float
331331 return $ this ->getTaxTotal ();
332332 }
333333
334+ /**
335+ * Calculate the discount.
336+ */
337+ public function calculateDiscount (): float
338+ {
339+ return 0.0 ;
340+ }
341+
334342 /**
335343 * Validate the shipping address.
336344 */
Original file line number Diff line number Diff line change @@ -414,7 +414,7 @@ public function applyCoupon(string|Coupon $coupon): bool
414414 } catch (ModelNotFoundException $ exception ) {
415415 //
416416 } catch (Throwable $ exception ) {
417- $ this ->coupons ()-> detach ([ $ coupon-> getKey ()] );
417+ $ this ->removeCoupon ( $ coupon );
418418 }
419419
420420 return false ;
You can’t perform that action at this time.
0 commit comments