• Resolved dexter303

    (@dexter303)


    Hi,

    is it possible to not allow administrator users to login thru the woocommerce login form? I want only customer user to be able to login to the form and administrator can use the wordpress login form.

    Regards,
    dex

    • This topic was modified 5 years, 7 months ago by dexter303.
Viewing 5 replies - 1 through 5 (of 5 total)
  • why do you want to restrict that ?

    you can use the hook “woocommerce_login_redirect”
    and then, according to the role, accept the connexion or not.

    or according to the role, redirect the user where you want.

    Thread Starter dexter303

    (@dexter303)

    Hello,

    I want to restrict it because I don’t want administrator to login thru the woocommerce login form. Is this possible?

    Is this realy necessary? Because this does has no effect. Your admins cann login via the /wp-login url or through the WC form. Both will lead them to have the dashboard of WP

    as i said, yes it’s possible by using the given hook (woocommerce_login_redirect).

    But as braehler said, we don’t understand the goal. Because it’s not necessary.
    If your admin log himself by the admin form, he will log on your shop also.
    So, no matter if he logs in via wc-form or wp-form.

    Thread Starter dexter303

    (@dexter303)

    thank you for your help.

    Regards

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘restrict login form for customer users only’ is closed to new replies.