Block Checkout
Checkout Block Support
BPGW supports the WooCommerce block checkout through dedicated block support classes and JavaScript payment method registration.
PHP integration
Each gateway has a corresponding block support class registered on the woocommerce_blocks_payment_method_type_registration hook:
app/Gateways/Blocks/BkashBlockSupport.phpapp/Gateways/Blocks/SSLCommerzBlockSupport.php
JavaScript integration
Each gateway registers its payment method via a dedicated JS file. Both scripts are wrapped in isolated scopes to prevent variable redeclaration collisions when both load together:
assets/js/bkash-block.jsassets/js/sslcommerz-block.js
Expected behavior
- If only one gateway is enabled, only that method is shown in block checkout.
- If both gateways are enabled, both methods appear side by side.
- The customer selects one option, then checkout continues with the hosted redirect flow.
- After payment, the standard callback verification flow runs identically to classic checkout.
Compatibility
WooCommerce 7.0+
Checkout Block
Classic Checkout
Fully compatible
Both classic shortcode checkout and the new Gutenberg block checkout are fully supported with identical payment flows.
