-
Notifications
You must be signed in to change notification settings - Fork 177
Open
Description
The plugin currently handles the /fb-checkout route by rendering the WooCommerce checkout page inside a full-screen <iframe> rather than performing a standard redirect. This approach causes several UX, technical, and compatibility issues.
| <iframe src="' . esc_url( $checkout_url ) . '"></iframe> |
Steps to Reproduce
- Install and activate the Facebook for WooCommerce plugin, set up with Meta Commerce account
- Build a test checkout URL formatted as: /fb-checkout?products={...}&coupon={...}.
- Upon code inspection, observe that the page loads an HTML wrapper with an <iframe> pointing to the checkout URL.
Current Behavior
- The entire checkout experience is embedded inside an <iframe>.
- The browser’s address bar remains fixed at /fb-checkout, even as users progress through the checkout flow.
- Navigating elsewhere or refreshing causes confusion because the URL does not reflect the current page state.
Expected Behavior
- Users should be redirected to the normal WooCommerce checkout URL after the cart is rebuilt, not shown within an <iframe>.
- Alternatively, if the iframe is required for specific integrations, the plugin should:
- Allow URL updates (pushState or redirect) when navigating to checkout or order confirmation.
- Provide a filter or setting to disable iframe wrapping.
Issues with Current Implementation
- Session and Cookie Problems - Some browsers restrict cookies and local storage in iframe contexts, leading to lost sessions or failed payments.
- Payment Gateway Incompatibility - Payment methods could fail or are blocked in iframes.
- Analytics and Conversion Tracking - Conversion tracking scripts may not fire correctly in iframes.
- Poor UX - URL never changes, confusing users and breaking bookmarks, refreshes, and the back button.
- Accessibility and SEO - Screen readers and accessibility tools struggle with iframe-wrapped pages.
Proposed Solutions
- Preferred: Replace the iframe output with a direct redirect to
wc_get_checkout_url()after rebuilding the cart and applying coupons. - Alternative: Introduce a filter or option to disable iframe embedding while keeping the cart-rebuilding logic intact.
- Minimal: Update browser history (via window.history.pushState) to reflect the actual checkout URL inside the iframe.
Environment
- WordPress: 6.8.3
- WooCommerce: 10.2.2
- Facebook for WooCommerce: 3.5.9
- Browser: Brave (Chromium) / Safari (issues reproducible on all)
Metadata
Metadata
Assignees
Labels
No labels