-
Notifications
You must be signed in to change notification settings - Fork 218
[POC] Add fields schema in cart store API #8891
base: trunk
Are you sure you want to change the base?
Conversation
The release ZIP for this PR is accessible via:
Script Dependencies ReportThere is no changed script dependency between this branch and trunk. This comment was automatically generated by the TypeScript Errors Report
🎉 🎉 This PR does not introduce new TS errors. |
Size Change: 0 B Total Size: 1.07 MB ℹ️ View Unchanged
|
This PR has been marked as If deemed still relevant, the pr can be kept active by ensuring it's up to date with the main branch and removing the stale label. |
This PR has been marked as If deemed still relevant, the pr can be kept active by ensuring it's up to date with the main branch and removing the stale label. |
This PR has been marked as If deemed still relevant, the pr can be kept active by ensuring it's up to date with the main branch and removing the stale label. |
This PR is only a proof of concept so we can test some approaches for allowing custom fields in Blocks checkout and WooPay. So don't expect a polished PR for now.
This PR adds a fields key to the response of the cart store API endpoint se custom fields can be defined there and loaded by external checkouts like WooPay.
It uses the
WC_Checkout::instance()->get_checkout_fields();
function to load the custom fields. This will allow plugins that already work with shortcode checkout to expose their custom fields. There is still a long way to check the needs for other plugins for example different types of fields, ways for plugins to validate via backend the fields values, etc.For now it's compatible with our WooCommerce checkout field editor plugin
Fixes #
Accessibility
prefers-reduced-motion
Other Checks
Screenshots
Testing
Automated Tests
User Facing Testing
WooCommerce Visibility
Performance Impact
Changelog