I purchased Affiliates Pro and I’m trying to set up a custom affiliate area. When I use affiliates_login_redirect to redirect to a custom page, when the User roles for the affiliate is set to Customer, redirect works well. But if I set User roles to Affiliate, the redirect does not work. It looks like it is just reloading the same page.
Any Idea what I should look for?
Many thanks.
Hi Antonio,
everything works fine now. I did a mistake setting Peter’s Login Redirect.
Thank you for your help.
Perfect 😉
Hi Jean Pierre,
That should not depend on role. Please check if the destination page is restricted to Customers roles, maybe the system can not access to this page.
Please give us the shortcode used.
Kind Regards,
Antonio B.
Hi Antonio, I kept the code generated by the Affiliates plugin.
I thought that there might be a restriction but there is none in the Content Permissions of the page I try to redirect to.
[affiliates_is_not_affiliate]
Connectez-vous pour accéder à l’espace affilié.
[affiliates_login_redirect redirect_url="http://example.com/home/fr/espace-affilies/membre"]
[/affiliates_is_not_affiliate]
Thanks.
Jean-Pierre.
Hi Antonio, I did some tests with other User Roles. It appears that the redirect_url does not work only when I am using the Affiliate User Role. Is it possible that there was a problem when that User Role was created?
I also looked to the Role Capabilities and Customer and Affiliate have the same rights. So they should behave the same.
It looks like if Affiliate appears as a User Role but it is not recognise.
Thank you.
Jean-Pierre.
I just found out that the problem might come from Peter’s Login Redirect plugin.
If I enter a rule on one specific role (Affiliate in that case), the redirect_url does not work.
I tried it with other roles and it behave the same. So I believe there is probably a conflict when using that plugin.
Is there an other plugin that I can try that would logout to a specific page instead of being redirect to the WP login form (wp-login.php)?
Thank you.
Hi jean-Pierre,
With the Peter’s Login Redirect plugin should work fine. You should be redirected to the url indicated as the Login URL on the Peter’s Login options.
Maybe WPi Custom Logout plugin can help you.
Kind Regards,
Antonio B.