Skip to:
Content
Pages
Categories
Search
Top
Bottom

flow


  • imagine2006
    Participant

    @imagine2006

    Hi,
    So I don’t even know if what I want is possible – came here looking for some guidance.
    I have a wordpress woocommerce site where people can purchase a monthly subscription for a service. That part all works fine.

    I installed buddypress because I want each subscriber to have their own profile and take bookings themselves (no payment option necessary – will be done off-site)

    I want each subscriber to be automatically put into a certain ‘group’ which I’ve already created. I’ve tried all the custom code I’ve found on here with the group id but nothing is working. The subscriber is automatically a ‘member’ but they’re not a member of the ‘group’

    This is the code I put in my functions.php file

    //Automatically add new users to a group
    function automatic_group_membership( $user_id ) {
    if( !$user_id ) return false;
    groups_accept_invite( $user_id, <# 0 #> );
    }
    add_action( ‘bp_core_activated_user’, ‘automatic_group_membership’ );

    I have my group id as ‘0’ because that’s what I found in the inspect tool https://snipboard.io/nlPTSM.jpg am i using the wrong id#

    Any help would be greatly appreciated

  • You must be logged in to reply to this topic.
Skip to toolbar