• Joseph G.

    (@dunhakdis)


    Hi there. It seems like there is a conflict between wp2fa and woocommerce.

    Steps to reproduce the issue:

    • So I set up wp2fa to enforce 2fa on all users without a grace period.
    • I tested by logging in as a subscriber user, woocommerce redirects me to /my-account page, but wp2fa redirects it back to /wp-admin/profile.php?show=wp-2fa-setup, redirecting it back to /my-account and the loop goes on until I hit a redirect error on the browser.

    Can be solved by adding the following snippet to the active theme’s functions.php

    add_action(‘admin_init’, function() {
    add_filter( ‘woocommerce_prevent_admin_access’, ‘__return_false’, 100 ); }, 1 );

    But it would be great if we could solve this.

Viewing 1 replies (of 1 total)
  • Plugin Contributor robertabela

    (@robert681)

    Thank you for using our plugin Joseph.

    What is happening in your setup is that you are enforcing 2FA, the plugin is trying to redirect the user to configure 2FA on their user profile page, but WooCommerce is not allowing them. This is just a configuration issue.

    Since you have a setup on which users are not allowed to access the default user profile page, you need to do the following:

    1. Configure the 2FA frontend page so that users can configure 2FA without needing access to the user profile page.
    2. You can then also add a configure 2FA tab in WooCommerce for the user. This is optional.

    I trust the above helps you set everything up. If you have any further issues, please do not hesitate to ask.

Viewing 1 replies (of 1 total)
  • The topic ‘Infinite redirection loop with WooCommerce’ is closed to new replies.