• Resolved jscottd

    (@jscottd)


    If I allow users to create an account from the checkout page, the account is created bypassing the UM registration page negating any account creation verification settings. How can I allow them to create an account from the checkout and force them to the UM registration?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @jscottd

    Unfortunately, this requires customization. Let’s see if others in the forum have done something similar and share their solutions here.

    Regards,

    Thread Starter jscottd

    (@jscottd)

    Kind of a big hole in the account verification functionality of the plugin.

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @jscottd

    When you redirect the user to the checkout page, are they coming from the product page?

    Regards,

    Thread Starter jscottd

    (@jscottd)

    Adding an item to the cart does not automatically direct them to checkout or cart, they have to click on the cart menu item and can either view cart and then go to checkout or select checkout. On a product page once they add an item to the cart they have the opportunity to View Cart, then choose to go to checkout.

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @jscottd

    You can only redirect guest users to the UM Register form when they try to visit the checkout page. And then once they’ve registered, they will be redirected back to the checkout page with the following code snippets:

    add_action('template_redirect','um_122021_check_if_logged_in');
    function um_122021_check_if_logged_in()
    {
        $pageid = get_option( 'woocommerce_checkout_page_id' );// your checkout page id
        if( ! is_user_logged_in() && is_page( $pageid ) && function_exists('um_get_core_page') )
        {
            $url = add_query_arg(
                'redirect_to',
                get_permalink($pageid),
                um_get_core_page("register")
            );
            wp_redirect( $url );
            exit;
        }
    }

    You can add the above code to your theme/child-theme’s functions.php file or use the Code Snippet plugin to run the code.

    Regards,

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hey there!

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.

    Please feel free to re-open this thread by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help. ??

    Regards,

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Forcing um registration at woocommerce checkout’ is closed to new replies.