This topic has 4 replies, 3 voices, and was last updated 10 years by cutestbooty.
-
Author
-
December 7, 2013 at 09:22 #7846slimsunny34Participant
I have read that PMPro automatically redirects your /register page to their /membership-levels page. So when users click ‘sign up’ on the home page, the reveal box pops up, they fill in their information, then click the ‘create my account’ button. This button is linked to /register, but that is automatically redirected by PMPro to /membership-levels. Once they click the level they want, it goes to /checkout. There they have another ‘sign up’ button, which is linked again to /register, which again redirects them right back to /membership-levels. This is incredibly frustrating and I can’t imagine why they would have this, as it makes registration literally impossible.
I have figured out how to disable the redirect, but I would still like it to go to /membership-levels after they fill in the reveal box. From there I would like it to go to /checkout, and then finally to /register. The problem is that I cannot figure out how to redirect the ‘create my account’ button to go to /membership-levels instead of /register. I’m assuming I’ll need to modify the code somewhere, but I have no idea where…I’ve spent hours looking. Please help…
December 9, 2013 at 13:26 #7955AbeKeymasterHello,
The thing is that you cannot checkout for a level before you have an account .. so going to checkout page and only after that to the register page is not possible.You can send users to the register page and after their first login redirect them to the levels page with this code added to sweetdate-child/functions.php
COPY CODEfunction function_new_user($user_id) { add_user_meta( $user_id, '_new_user', '1' ); } add_action( 'user_register', 'function_new_user'); //The next function will check if it's the first login and redirect the user. function function_check_login_redirect($user_login, $user) { $logincontrol = get_user_meta($user->ID, '_new_user', 'TRUE'); if ( $logincontrol ) { //set the user to old update_user_meta( $user->ID, '_new_user', '0' ); //Do the redirects or whatever you need to do for the first login wp_redirect( pmpro_url(), 302 ); exit; } } add_action('wp_login', 'function_check_login_redirect', 10, 2);
or
PMPRO by default allows registration from the checkout page but you won’t use the Buddypress register page. To enable the default behaviour you need to replace the content of this file wp-content/themes/sweetdate/paid-memberships-pro/pages/checkout.php with attached file
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.Attachments:
You must be logged in to view attached files.October 28, 2014 at 18:41 #33349cutestbootyParticipantHi Abe,
I tried clicking on the link at the bottom of your post (http://d.pr/n/yum6) but it doesn’t seem to be working right now. Do you have a current link for that file?
Cheers
November 4, 2014 at 12:18 #33950AbeKeymaster@cutestbooty I have updated the reply and added a .txt attachment
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer. -
AuthorPosts
You must be logged in to reply to this topic.