Closed filipefurtad0 closed 2 years ago
I guess this one should be renamed to Remove "Checkout only" option on payment methods
, as it's not strongly related to splitcheckout and will actually remove this option in both split / legacy checkout, right?
it's not strongly related to splitcheckout
Good point :+1: Renamed and updated the issue. Thanks!
Hmmm... I thought this feature was being used? :thinking:
@Matt-Yorkley "backoffice only" yes, "back+ front" yes, but not "checkout only". But we can double check by checking in prod DB if we have users who have selected this?
It seems there are some payment methods in FR-prod which are set to checkout only
, two of them are Stripe SCA:
select count(*) from spree_payment_methods where display_on = 'front_end';
=> 8
select count(*) from spree_payment_methods where display_on = 'front_end' AND type = 'Spree::Gateway::StripeSCA';
=> 2
@filipefurtad0 can we know the hub id?
The hub (it seems to be only one) using SCA as "checkout only" is:
openfoodnetwork=> SELECT distributor_id FROM distributors_payment_methods WHERE payment_method_id IN (select id FROM spree_payment_methods WHERE display_on = 'front_end' AND type = 'Spree::Gateway::StripeSCA');
distributor_id
----------------
2412
(1 row)
The others are:
openfoodnetwork=> SELECT distributor_id FROM distributors_payment_methods WHERE payment_method_id IN (select id FROM spree_payment_methods WHERE display_on = 'front_end' AND type != 'Spree::Gateway::StripeSCA');
distributor_id
----------------
1453
1072
1063
2412
3192
(5 rows)
@filipefurtad0 thank you ❤️ I've switched them all :)
So it's safe to remove now? @RachL
I'll get on it then 😀
@apricot12 yes. I think we need to run a little migration as part of the removal? Switching all existing "checkout only" to "backoffice and checkout" ?
Is it migration to both back office AND checkout or only to one of these in the DB? @RachL
@apricot12 yes both! Switching to backoffice only would make payment method disappear from the shopfront. That would be annoying 😅
Sounds good. Will take a crack at it.
Description
Came up in #8871, but valid for both legacy and split checkout.
The
checkout only
option is available only for payment methods but seems not to be working correctlyfor split checkout. We should remove it from the dropdown, when editing a payment method:/admin/payment_methods/<id>/edit
Expected Behavior
The
checkout only
option should not appear on the dropdown when editing payment methods.Actual Behaviour
The
checkout only
option appears on the dropdown when editing payment methods; setting it as the only payment method closes the shopon split-checkout.Steps to Reproduce
Animated Gif/Screenshot
Workaround
Set the payment method as
Both checkout and backoffice
Severity
bug-s3
Your Environment
Possible Fix