Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing Giropay due deprecation #3229

Merged
merged 20 commits into from
Jul 9, 2024
Merged

Removing Giropay due deprecation #3229

merged 20 commits into from
Jul 9, 2024

Conversation

wjrosa
Copy link
Contributor

@wjrosa wjrosa commented Jun 27, 2024

Fixes #3223

Changes proposed in this Pull Request:

Giropay is going away as of Jun 30th, 2024. This PR removes it as a payment option in settings and checkout (block and shortcode versions) for legacy and new checkout experiences.

Testing instructions

  • Checkout to this branch on your local environment (tweak/remove-giropay)
  • Run npm install, npm run build:webpack and npm run up
  • With the legacy checkout experience disabled, go to the payment method listing (wp-admin/admin.php?page=wc-settings&tab=checkout&section=stripe&panel=methods)
  • Confirm that you cannot see Giropay there
  • As a shopper, add a product to your cart
  • Confirm that you cannot see Giropay in any checkout version (blocks or shortcode)
  • Enable the legacy checkout experience
  • Repeat the previous steps and confirm you still cannot see Giropay in any checkout version (blocks or shortcode)

  • Covered with tests (or have a good reason not to test in description ☝️)
  • Added changelog entry in both changelog.txt and readme.txt (or does not apply)
  • Tested on mobile (or does not apply)

Post merge

@wjrosa wjrosa self-assigned this Jun 27, 2024
@wjrosa wjrosa marked this pull request as ready for review June 28, 2024 14:07
@wjrosa wjrosa requested review from a team and a-danae and removed request for a team June 28, 2024 15:33
@wjrosa wjrosa requested a review from diegocurbelo July 9, 2024 13:13
Copy link
Member

@diegocurbelo diegocurbelo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good and it tests well, just the one test mentions sofort (which was deprecated a while back) instead of the intended alipay.

And also, the usual conflicts with the readme and changelog.

None of them are critical, so I'm approving this... feel free to merge this after fixing those

Copy link
Contributor

@a-danae a-danae left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes here @wjrosa !

Things work as specified in the PR description. Giropay isn't displayed:

✅ On the shortcode checkout page
✅ On the block checkout page
✅ On the Stripe settings page

Both when the Legacy checkout experience is enabled and disabled.

I have a few non-blocking questions.

❓ Why not remove the Giropay-related settings from the database on upgrade, instead of filtering it out later in several places? I left a comment below related to this.

❓ Besides the Giropay gateway files, we have other references to Giropay in the code. Are these intentionally kept?

❓ Why not remove the Giropay gateways?

Just questions. There may be scenarios I'm missing, and we could address anything that's needed separately as this behaves as expected. Happy to see this merged.

@@ -25,6 +25,7 @@ const api = new WCStripeAPI(
const upeMethods = getPaymentMethodsConstants();
Object.entries( getBlocksConfiguration()?.paymentMethodsConfig )
.filter( ( [ upeName ] ) => upeName !== 'link' )
.filter( ( [ upeName ] ) => upeName !== 'giropay' ) // Skip giropay as it was deprecated by Jun, 30th 2024.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we're filtering out giropay in several places right before we display it. How about removing it earlier, closer to the source we use everywhere else?

Like when retrieving the available payment methods that are then passed to JS...

Or earlier when retrieving the enabled payment methods.

Or removing its options from the database directly on upgrade.

Not requesting changes for this, just curious about the approach. Maybe I'm missing a scenario that's better handled this way.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just felt safe removing it that way because we need to keep the method for refunds. But I think your suggestions make sense. I will merge this as is and open another PR to improve it for the next release if that sounds ok!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just felt safe removing it that way because we need to keep the method for refunds.

Keeping it if it's still in use makes sense. But are refunds working for Giropay with these changes?

Testing over here, I only see the Manual refund option in a Giropay order when checking out these changes.

image

If I go back to the 8.4.0 tag, the option to refund via Giropay does show up

image

Glad to learn if there's a use for it that I'm missing. And glad to keep the Gateway class in that case!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, thanks for checking! I will work on this separately on the next days

@wjrosa wjrosa merged commit fe2938d into develop Jul 9, 2024
33 checks passed
@wjrosa wjrosa deleted the tweak/remove-giropay branch July 9, 2024 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Payment Methods - Giropay deprecation
3 participants