Simple Membership Plugin › Forums › Simple Membership Plugin › Membership Log In Page
Tagged: log in
- This topic has 5 replies, 2 voices, and was last updated 9 years, 2 months ago by
mbrsolution.
-
AuthorPosts
-
January 19, 2017 at 10:02 am #9758
Newbie10924
ParticipantA customer buys a plan. Customer gets the email from me to complete the registration. When registration is completed, customer gets directed to the Membership Log In page. I would like the Customer to go to a different page. I want to direct them to a Thank You page already created instead. How can I change this flow?
January 19, 2017 at 10:35 pm #9771mbrsolution
ModeratorHi, you can add the following function to your theme functions.php file.
add_action('swpm_front_end_registration_complete', 'sam_after_registration_redirection'); function sam_after_registration_redirection() { $url = 'http://www.yourwebsite.com/thank-you/';//TODO - Specify the URL that you want to redirect to wp_redirect($url); }Let me know if this helps you.
Regards
January 23, 2017 at 10:02 am #9818Newbie10924
ParticipantIt didn’t work but probably due to my inexperience with editing files. Thanks anyway.
January 23, 2017 at 11:39 pm #9831mbrsolution
ModeratorHi, can you share what exactly you did that did not work for you? Can you also share the code you added to your functions.php file?
January 24, 2017 at 7:20 am #9840Newbie10924
ParticipantI just copied and pasted your code and used my URL with the https instead of just http.
<?php
// Exit if accessed directly
if ( !defined( ‘ABSPATH’ ) ) exit;// BEGIN ENQUEUE PARENT ACTION
// AUTO GENERATED – Do not modify or remove comment markers above or below:if ( !function_exists( ‘chld_thm_cfg_parent_css’ ) ):
function chld_thm_cfg_parent_css() {
wp_enqueue_style( ‘chld_thm_cfg_parent’, trailingslashit( get_template_directory_uri() ) . ‘style.css’ );
}
endif;
add_action( ‘wp_enqueue_scripts’, ‘chld_thm_cfg_parent_css’ );add_action(‘swpm_front_end_registration_complete’, ‘sam_after_registration_redirection’);
function sam_after_registration_redirection()
{
$url = ‘https://www.xxxxx.org/thank-you/’;//TODO – Specify the URL that you want to redirect to
wp_redirect($url);
}
// END ENQUEUE PARENT ACTIONJanuary 24, 2017 at 9:34 am #9843mbrsolution
ModeratorSimply add the code I shared above without the extra that you added. This function does work. Many have tested the function and it works.
Give this a try.
Thank you
-
AuthorPosts
- You must be logged in to reply to this topic.