آخرین اخبار

Preventing redirect after onCheckoutSuccess in WooCommerce Blocks checkout – مرجع علم و فناوری


Hi,

We are currently developing a payment gateway plugin and have successfully made it compatible with WooCommerce Blocks for the new checkout experience. Our payment process is designed to operate within an iFrame to ensure a seamless user experience.

With the standard WooCommerce checkout, we manage the payment flow and prevent automatic redirection after payment by hooking into the ‘checkout_place_order_success’ event. However, when adapting our plugin to work with WooCommerce Blocks, we encountered a challenge with the onCheckoutSuccess event.

In the context of WooCommerce Blocks, once the onCheckoutSuccess event is fired, WooCommerce proceeds with a redirection to the specified redirect_url. We aim to interrupt this redirect to retain users within the iFrame until the payment process is fully complete and controlled by our plugin logic.

Here are the specifics of our implementation challenge:

  • We have successfully intercepted the onCheckoutSuccess event within our React component.
  • Despite our interventions, we cannot seem to prevent WooCommerce from executing the default redirection to redirect_url after the event completes.

Our primary question is: Is there a supported method or recommended approach within WooCommerce Blocks to prevent or override this automatic redirection upon successful checkout within the context of an iFrame payment process?

Any insights, documentation references, or examples would be greatly appreciated as we aim to ensure compatibility and a smooth user experience with WooCommerce Blocks.

Thank you in advance for your support and guidance.

The page I need help with: [log in to see the link]



منبع خبر

دیگر رسانه های کشور:

آموزشگاه رسانه |ارتباط اقتصادی| ارتباط فردا|ارتباط فرهنگی|ارتباط ورزشی|تهران اقتصادی |تهران ورزشی|مرجع وب و فناوری|پایگاه خبری شباب |همسونیوز

نوشته های مشابه

دکمه بازگشت به بالا