mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-04 22:16:08 +00:00
Merge pull request #8810 from Matt-Yorkley/split-checkout-tax
Reduce expensive tax recalculation calls
This commit is contained in:
@@ -310,6 +310,8 @@ module Spree
|
||||
# Creates new tax charges if there are any applicable rates. If prices already
|
||||
# include taxes then price adjustments are created instead.
|
||||
def create_tax_charge!
|
||||
return if state.in?(["cart", "address", "delivery"]) && Flipper.enabled?(:split_checkout)
|
||||
|
||||
clear_legacy_taxes!
|
||||
|
||||
Spree::TaxRate.adjust(self, line_items)
|
||||
|
||||
Reference in New Issue
Block a user