Skip to content

Commit e5cf282

Browse files
committed
Integrate registration form with WooCommerce addon
1 parent 036bb61 commit e5cf282

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

includes/wpum-shortcodes/shortcodes.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,12 +188,14 @@ function wpum_registration_form( $atts, $content = null ) {
188188

189189
if ( wpum_is_registration_enabled() ) {
190190

191-
if ( is_user_logged_in() && ! $is_success && ! ( isset( $_GET['context'] ) && 'edit' === $_GET['context'] ) ) {
191+
$finalstep = apply_filters( 'wpum_check_next_step', true );
192+
193+
if ( is_user_logged_in() && $finalstep && ! $is_success && ! ( isset( $_GET['context'] ) && 'edit' === $_GET['context'] ) ) {
192194

193195
WPUM()->templates
194196
->get_template_part( 'already-logged-in' );
195197

196-
} elseif ( $is_success ) {
198+
} elseif ( $is_success && $finalstep ) {
197199

198200
$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' ) );
199201

0 commit comments

Comments
 (0)