BuddyDev

Search

[Resolved] how can I replace the buddypress registration with WooCommerce registration

Tagged: 

  • Participant
    Level: Enlightened
    Posts: 32
    Gisela Zechner on #52097

    Hi Buddy-Dev Team,

    I have a problem with the registration. I need that all users register with the WooCommerce registration form. Only then the membership works properly. Every user who registers with the default buddypress registration form and process doesn’t get access to the whole membership area. And the user is not listed on the Dashboard > All Users.

    When a visitor clicks a link to a protected content he is forwarded to the buddypress login-form and registration form. But he should be lead to the WooCommerce login and Registration.

    I have tried to change the url in the Dashboard > BuddyPress > Url to the My-account page of WooCommerce. But BuddyPress overwrites the WooCommerce content and includes the buddypress registration.

    How can I avoid, that any visitor reach the default BuddyPress login and registration form.

    Thanks in advance
    Gisela

  • Participant
    Level: Enlightened
    Posts: 32
    Gisela Zechner on #52098

    I want to correct me – The new registered user is viewable in the “Dashboard > All Users”.

  • Keymaster
    (BuddyDev Team)
    Posts: 24257
    Brajesh Singh on #52106

    Hi Gisela,
    Thank you for the question.

    Please put this in your bp-custom.php

    
    
    // Disable BP registration
    add_filter( 'bp_get_signup_allowed', function () {
    	return false;
    } );
    
    // map register url.
    add_filter( 'bp_get_signup_page', function ( $url ) {
    
    	if ( function_exists( 'wc_get_page_permalink' ) ) {
    		return wc_get_page_permalink( 'myaccount' );
    	}
    
    	return $url;
    } );
    
    

    This should disable BuddyPress registration page and redirect to WooCommerce My account page for registration.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 32
    Gisela Zechner on #52158

    Thanks a lot – I’ve added the code in my function.php of the child-theme and it works.

    Best wishes
    Gisela

  • Keymaster
    (BuddyDev Team)
    Posts: 24257
    Brajesh Singh on #52178

    You are welcome!

The topic ‘ [Resolved] how can I replace the buddypress registration with WooCommerce registration’ is closed to new replies.

This topic is: resolved