-
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
Using Blocks API to handle ECE cart requests #3780
Using Blocks API to handle ECE cart requests #3780
Conversation
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.
Great work! Found a shipping rates-related bug in shortcode cart/checkout:
- Clear your cookies.
- A a guest shopper, add a shippable product to cart.
- Go to shortcode cart or shortcode checkout, and click Google Pay.
- You will see this console error:
v3/?ver=3.0:1 Uncaught (in promise) IntegrationError: When `shippingAddressRequired` is true, you must specify `shippingRates`.
Good catch, Anne! I fixed it in 2af80a8 . Also added support for discounts. |
Yeah, that's strange. I just tested again using the checkout, product, and cart pages. Anonymous and when logged in 🤔 . Did you try anything different from the steps you shared above? |
Same steps. Do you have shipping zones defined? I have this: |
Fix verified! Thanks! Found a different issue, this time with variable products.
Note that there is a PHP notice seen when loading a variable product page. I've filed the issue in #3815. This notice is also present in |
Another great catch, Anne! 👍 Fixed it in 57a8a79. But it will just work with WC 9.7.0 since this part of the code was fixed here. So, upon merging this PR we may need to update the min. required WC version 🤔 (after waiting for the release). |
@annemirasol to avoid blocking this PR, I decided to support the legacy version when variations are present in e123a0c. Let me know what you think 👀 |
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.
to avoid blocking this PR, I decided to support the legacy version when variations are present in e123a0c. Let me know what you think 👀
Makes sense to me!
LGTM, no regression detected -- can complete purchases across different pages and using different payment methods! 🚢
Changes proposed in this Pull Request:
This PR expands the usage of the Blocks API (Cart API) to requests related to the cart itself: when adding items to the cart, retrieving items, removing, emptying, etc.
Testing instructions
tweak/using-blocks-api-to-process-cart-requests
)changelog.txt
andreadme.txt
(or does not apply)Post merge