Spike: use the Blocks API instead of our AJAX APIs for the Payment Request Buttons #1573
Labels
component: blocks
Cart and checkout blocks
priority: low
The issue/PR is low priority—not many people are affected or there’s a workaround, etc.
type: technical debt
This issue/PR represents/solves the technical debt of the project.
The WooCommerce Blocks API has seen significant improvements since #1467 was opened, and we should try to make use of those improvements.
The Blocks API brings with it significant improvements in terms of the Checkout flow, especially in terms of UX; it's more light-weight than the current implementation; and by using the Blocks API without maintaining our own custom solution for that.
Part of what we should try to do here is to build 2 versions of our Payment Request scripts; one can be the legacy version using our AJAX APIs, and the other a newer version that entirely relies on the Blocks API. We then conditionally load the right script based on what version of WooCommerce Blocks is installed.
What we need to understand
process_payment
so they work for both the Shortcode and Blocks API flows without the need to write much JS for each type of flow?What if something doesn't work or isn't possible?
The text was updated successfully, but these errors were encountered: