-
Notifications
You must be signed in to change notification settings - Fork 75
Open
Labels
Description
Describe the bug
The WooPay Direct Checkout flow does not intercept the "Go to checkout" button click in the mini-cart block after WooCommerce migrated it from React to the WordPress Interactivity API (iAPI). This means users are sent to the normal checkout page instead of being redirected to WooPay.
The iAPI mini-cart became the default in WooCommerce 10.4 (Dec 10, 2025), so this affects all stores on WC 10.4+.
Related: WOOPMNT-4079
Root Cause
Two compounding issues in client/checkout/woopay/direct-checkout/index.js:
- Widget detection selector is missing:
maybeObserveMiniCart()checks for[data-block-name="woocommerce/mini-cart"], but the iAPI version usesdata-wp-interactive="woocommerce/mini-cart"instead. The function exits early. - MutationObserver is incompatible with iAPI: The observer watches for
.wc-block-components-drawer__screen-overlaybeing added to the DOM. In iAPI, the overlay is server-side rendered and always in the DOM — visibility toggles via CSS classes, not DOM insertion. The observer never fires.
To Reproduce
- Use WooCommerce 10.4+ (iAPI mini-cart is default).
- Enable WooPay Direct Checkout.
- Add an item to the cart.
- Open the mini-cart drawer.
- Click "Go to checkout".
- Expected: Redirect to WooPay checkout.
- Actual: Navigates to the normal WooCommerce checkout page.
Environment
- WooCommerce 10.4+ (iAPI mini-cart enabled by default)
- Any WooPayments version with Direct Checkout support
Reactions are currently unavailable