Merge pull request #11290 from cyrillefr/Orders_in_confirmation_state_cannot_be_completed_by_hub_or_shop

Fix Orders in confirmation state cannot be completed by hub or shop
This commit is contained in:
Filipe
2023-11-16 19:50:14 +00:00
committed by GitHub
13 changed files with 49 additions and 12 deletions

View File

@@ -140,7 +140,8 @@ module Spree
#
# Otherwise redirect user to that step
def can_transition_to_payment
return if @order.payment? || @order.complete? || @order.canceled? || @order.resumed?
return if @order.confirmation? || @order.payment? ||
@order.complete? || @order.canceled? || @order.resumed?
flash[:notice] = Spree.t(:fill_in_customer_info)
redirect_to spree.edit_admin_order_customer_url(@order)
@@ -184,7 +185,8 @@ module Spree
end
def allowed_events
%w{capture void_transaction credit refund resend_authorization_email}
%w{capture void_transaction credit refund resend_authorization_email
capture_and_complete_order}
end
end
end