-
Notifications
You must be signed in to change notification settings - Fork 66
getLoginRedirectPermalink redirects to my account when trying to access an order #207
Comments
In this case, I recommend the removal of the woo-poly Login.php, there is no need for this plugin to attempt to modify the login behaviour. removal can be done quickly in various ways:
@hyyan what's the use case for this? |
this will be broken again in 1.0.3 as the login code has been restored: this means when the client is logging in from an email to pay for an order for example, the login redirects to my account home page, instead of the order or payment page. This is because the code is only looking up the link for the page (which is un-necessary) and does not know about the endpoint requested. (There was also a related change in WooCommerce to fix the login direct to endpoint, this is now done.) |
Ok, I got it, there's no translation for the endpoints in URLs so the login is maybe deliberately stripping the endpoint. To solve, there's a missing filter which can be implemented like this in endpoints.php:
Then for example if you want to add order links to emails, this code works whatever the order language: (as long as you also disable the login filter so it is possible to link through to the order after login) It doesn't quite solve the @todo comment on links in menus, since the menu editor isn't aware of the language of the menu being edited.... |
quick note:
|
Hmmm , @Jon007 As far as I can remember this part exists since version Closing no need to invest time in this part |
Steps to Reproduce
What I Expected
What Happened Instead
Actually the same problem exists in WooCommerce #15911,
however woo-poly also filters woocommerce_login_redirect and getLoginRedirectPermalink() page look up causes redirects to the root page (eg the my-account page) instead of the requested endpoint.
The text was updated successfully, but these errors were encountered: