Assign membership to any new member
-
Hello, I found this code in your forum
add_action( 'user_register', function( $user_id ){ $member = MS_Factory::load( 'MS_Model_Member', $user_id ); if ( $member ) { $subsription = $member->add_membership( 1015 ); } } );
This is half working, in the sense that any new user is getting his membership. but actually the protection rules are not applying to him.
He’s assigned in the backend, but in the front end he’s closed out from any page.If I assign as admin a new membership by hand, then it’s working.
It seems that the automation is missing to put the member in some tables…
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Assign membership to any new member’ is closed to new replies.