-
Notifications
You must be signed in to change notification settings - Fork 207
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
Adding Amazon Pay to the classic checkout #3793
Conversation
56943b2
to
ed5e933
Compare
@@ -41,8 +41,9 @@ public function __construct() { | |||
* @return string | |||
*/ | |||
public function get_title( $payment_details = false ) { | |||
if ( $payment_details && isset( $payment_details->card->wallet->type ) ) { | |||
return $this->get_card_wallet_type_title( $payment_details->card->wallet->type ); | |||
$wallet_type = WC_Stripe_Payment_Methods::AMAZON_PAY === ( $payment_details->type ?? null ) ? WC_Stripe_Payment_Methods::AMAZON_PAY : ( $payment_details->card->wallet->type ?? null ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I should replace this with another IF. A bit confusing to read.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree an if-else clause might be easier to read here. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, and tests out well ✨ Love the unit tests!
- Verified working well in:
- product page
- shortcode cart
- shortcode checkout
- Verified that charges clear and payment method title is correct
🚢🚢🚢
Thanks for the review, Anne! I have fixed the setting issue in 14e849d |
We may need to turn Link and Amazon Pay independent from Google/Apple Pay. Right now, both only works if the first is enabled. |
Fixes #3733
Changes proposed in this Pull Request:
This PR introduces Amazon Pay as a new payment method for the Stripe Express Checkout Element on the classic checkout, product, and cart pages.
Most of the implementation was done using the other wallet methods as a reference to avoid the method showing up as another option on the regular checkout (not ECE).
Testing instructions
changelog.txt
andreadme.txt
(or does not apply)Post merge