Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As of WooCommerce 8.3, Cart and Checkout Blocks have become enabled by default. I've been following this guide to try to add support for WooCommerce Checkout Blocks. A lot of progress has been made, but we are still facing issues getting our
KomojuFields
elements (from https://multipay.komoju.com/fields.js) to load, which means we don't have our iframes for payment methods like credit card and konbini. In previous versions, this was handled by WC_Gateway_Komoju_Single_Slug::payment_fields, but this is no longer working. There are probably various options to solve this, such as passing the html to the frontend or passing the required data to the frontend and constructing the html there (it can be passed in WC_Gateway_Komoju_Blocks::get_payment_method_data). Additionally, I suspect methods such as WC_Gateway_Komoju_Single_Slug::validate_fields, WC_Gateway_Komoju_Single_Slug::validate_fields, etc might also need to be reworked in order to be compatible with Block Checkout.Useful simple example:
https://sevengits.com/woocommerce-checkout-blocks/
Stripe's implementation:
https://github.com/woocommerce/woocommerce-gateway-stripe/pull/1467/files
Other references:
https://developer.woo.com/2022/07/07/exposing-payment-options-in-the-checkout-block/