-
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
Miscellaneous tasks on ECE #3551
Conversation
public function filter_cart_needs_shipping_address( $needs_shipping_address ) { | ||
if ( $this->express_checkout_helper->has_subscription_product() && wc_get_shipping_method_count( true, true ) === 0 ) { | ||
return false; | ||
} | ||
|
||
return $needs_shipping_address; | ||
} |
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.
@Mayisha What behavior do we want from ECE when there are no defined shipping zones, but the cart is shippable? Should we let the order push through with just the billing address? Do you know if there any implications when a shippable order does not have a shipping address?
Asking also because I think I introduced a bug in #3560 for block cart and block checkout, when using ECE and there are no defined shipping zones. It should be an easy fix but I wanted to make sure it's the behavior we want.
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.
My understanding is, if we are offering Stripe card payment method on the cart/checkout page and the displayed/charged amount on the Google/Apple Pay modal is correct, then we should offer Google/Apple Pay as well.
What are your thoughts on this @annemirasol ? 👀
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.
Yeah, this makes sense. If we are letting it happen via other payment methods, we should let it happen via express checkout 👍
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.
LGTM! 🚢🚢
- Verified express checkout buttons are localized.
- Verified no more express payment-side error, when I forced WC checkout validation to fail.
- Verified I can purchase subscriptions on the product/shortcode cart/shortcode checkout even without store shipping zones set up. I will fix the bug I introduced in Fix ECE crash when address has no defined shipping rates #3560 to make block cart and block checkout behave the same 😔
public function filter_cart_needs_shipping_address( $needs_shipping_address ) { | ||
if ( $this->express_checkout_helper->has_subscription_product() && wc_get_shipping_method_count( true, true ) === 0 ) { | ||
return false; | ||
} | ||
|
||
return $needs_shipping_address; | ||
} |
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.
Yeah, this makes sense. If we are letting it happen via other payment methods, we should let it happen via express checkout 👍
Handled some miscellaneous tasks in this PR.
Changes and testing instructions
locale
to ECE when initializing (c2e3a6f)source
withpayment method
on the edit subscription page (c6f730b)Stripe Sources ID
. Now it is changed toStripe Payment Method ID
paymentFailed
function for order creation failures (071cd30)abortPayment
function. WhenabortPayment
is called due to order related failure (not payment failure with ECE), thepaymentFailed( { reason: 'fail' } )
call throws an error.Fixed issue in purchasing subscriptions when the store has no shipping options (148b75b)
develop
, you should see the above error, but in this branch payment should work fine.