From 828a84225027eaa30299b746f8bba1e7b35f1ec9 Mon Sep 17 00:00:00 2001 From: Rey Calantaol Date: Tue, 23 Mar 2021 03:36:24 +0800 Subject: [PATCH] - Changes related to (wpum-rcp addon) #2 Add RCP registration payment to WPUM registration forms Purpose for this change is to show the correct next step when wp_set_current_user($id) is set. --- includes/wpum-shortcodes/shortcodes.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/wpum-shortcodes/shortcodes.php b/includes/wpum-shortcodes/shortcodes.php index c0e2b7fe..5d2152d7 100644 --- a/includes/wpum-shortcodes/shortcodes.php +++ b/includes/wpum-shortcodes/shortcodes.php @@ -187,12 +187,13 @@ function wpum_registration_form( $atts, $content = null ) { if ( wpum_is_registration_enabled() ) { - if ( is_user_logged_in() && ! $is_success && ! ( isset( $_GET['context'] ) && 'edit' === $_GET['context'] ) ) { + $finalstep = apply_filters('wpum_check_next_step', false); + if ( is_user_logged_in() && ! $is_success && ! ( isset( $_GET['context'] ) && 'edit' === $_GET['context'] ) && $finalstep ) { WPUM()->templates ->get_template_part( 'already-logged-in' ); - } elseif ( $is_success ) { + } elseif ( $is_success && $finalstep ) { $success_message = apply_filters( 'wpum_registration_success_message', esc_html__( 'Registration complete. We have sent you a confirmation email with your details.', 'wp-user-manager' ) );