Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to: Distinguish Woocommerce costumers and BuddyPress members?


  • cviniciusj
    Participant

    @cviniciusj

    Hi there!
    I’m going to make both of things.

    I know the base of users is the same of WordPress. So some users will be just regular costumers of WooCommerce store and others will be Members of a Community. How do I make it?

    There is no problem if I’ll have to make the register of BuddyPress members manually, because the costumers have to register them direct from forms to allow buying the stuff.

    In resume: A community member can also be a constumer, but a costumer can’t be a listed member on BuddyPress Community.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @cviniusj-

    It sounds like you are wanting user who register via WooCommerce to appear as members on the members directory in BP. What you’ll have to do is add a last_activity meta item for those users when they register, so that BP will include them in user queries. I’m not knowedgable about Woo, but something like this might work:

    add_action( 'user_register', function ( $user_id ) {
    	bp_update_user_last_activity( $user_id, date( 'Y-m-d H:i:s', bp_core_current_time( true, 'timestamp' ) ) );
    } );

    cviniciusj
    Participant

    @cviniciusj

    It’s the oposite of it. I don’t want the Costumers be a member of directory in BP.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar