Skip to content

Commit

Permalink
Remove call to VoucherAdjustmentService when creating a voucher
Browse files Browse the repository at this point in the history
Voucher will be automatically applied when the order transition to
the confirmation step. No need to do the work twice.
  • Loading branch information
rioug committed Jun 30, 2023
1 parent ba3aad5 commit 82595e3
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions app/controllers/voucher_adjustments_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ class VoucherAdjustmentsController < BaseController

def create
if add_voucher
VoucherAdjustmentsService.calculate(@order)
@order.update_totals_and_states

update_payment_section
elsif @order.errors.present?
render_error
Expand Down

0 comments on commit 82595e3

Please sign in to comment.