Hi there,
Thank you for using Paid Memberships Pro.
Please can you try the following gist to stop the login redirect – https://gist.github.com/strangerstudios/9583086
You may add this code to your website using a plugin like Code Snippets or something similar.
Please let me know if this helps.
Hi Andrew,
Thank you very much for your response and willingness to help 🙂
I have inserted this snippet into our Theme’s Functions.php file (see here), however it did not prevent the user from being redirected? (screenshot here)
Kindly advise if I did something incorrect, or if there is another way to edit the hyperlink behind this text to https://picflick.co.za/my-account
Thank you!
Regards, Greg
Thanks for the feedback Greg, I’m sorry to hear this didn’t work. The Login link on the checkout page makes use of the wp_login_url() function for WordPress.
Does WooCommerce redirect user’s from the login page to their account page to login? It seems if you go to http://www.picflick.co.za/login it redirects to the Jetpack login page.
I’ve run some tests and noticed that WooCommerce doesn’t force a redirect to the my-account
page by default. You will need to customize your site further to set the ‘My Account’ page as the default login page for WordPress. There may be additional plugins to achieve this.
I ran further tests on the pmpro_login_redirect_url
and this is only for once the user is logged-in and not the actual login URL. JetPack may have a feature to choose a specific login URL or you may reach out to your hosting support to see if they allow this as you are on WordPress.com hosting.
Thank you for understanding.
Thanks for running those tests Andrew. This seems more complicated than we thought 🙂
I tried your recommended method for the custom Login URL (used this plugin: https://wordpress.org/plugins/custom-login-url/) however after testing, I identified that:
- it interfered with our ability to login to WordPress back-end as Administrators (when entering https://picflick.co.za/wp-admin).
- It also wouldnt allow us to logout (when logged in as both an Administrator and Vendor
So I ventured into the plugin files paid-memberships-pro/pages/checkout.php (active) and found the following line:
<span class="pmpro_checkout-h3-msg"><?php _e('Already have an account?', 'paid-memberships-pro' );?> <a href="<?php echo wp_login_url( pmpro_url("checkout", "?level=" . $pmpro_level->id . $discount_code_link) ); ?>"><?php _e('Log in here', 'paid-memberships-pro' );?></a></span>
This seems like the exact line in the page I want to edit, and the only one in the whole plugin. Would do think if I change it to the following?
<span class="pmpro_checkout-h3-msg"><?php _e('Already have an account?', 'paid-memberships-pro' );?> <a href="https://picflick.co.za/my-account"><?php _e('Log in here', 'paid-memberships-pro' );?></a></span>
Or is there a better way you think we can rewrite this?
Looking forward to your response.
Thanks, Greg
-
This reply was modified 5 years, 4 months ago by
Picflick.
-
This reply was modified 5 years, 4 months ago by
Picflick.
You can customize the checkout page template, I was leaving this to a last resort.
Here is a guide on how to properly create a custom page template for Paid Memberships Pro – https://www.paidmembershipspro.com/documentation/templates/
I hope this helps 🙂
Hi Andrew,
I just wanted to let you know that this helped to resolve our issue 🙂
Many thanks for your interactive support, provided material, and commitment to assisting us
Thanks and regards,
PicFlick