Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'wpf_user_created', 'add_group_access_after_registration', 20, 3 );
- function add_group_access_after_registration( $user_id, $contact_id, $post_data ) {
- $ld_groups = array(1286);
- foreach($ld_groups as $group_id) {
- $settings = get_post_meta( $group_id, 'wpf-settings-learndash', true );
- if ( !empty( $settings ) && !empty( $settings['tag_link'] ) ) {
- wp_fusion()->user->apply_tags( $settings['tag_link'], $user_id );
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement