Advertisement
verygoodplugins

Untitled

Jan 29th, 2017
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.45 KB | None | 0 0
  1. add_action( 'wpf_user_created', 'add_group_access_after_registration', 20, 3 );
  2.  
  3. function add_group_access_after_registration( $user_id, $contact_id, $post_data  ) {
  4.     $ld_groups = array(1286);
  5.  
  6.     foreach($ld_groups as $group_id) {
  7.         $settings = get_post_meta( $group_id, 'wpf-settings-learndash', true );
  8.         if ( !empty( $settings ) && !empty( $settings['tag_link'] ) ) {
  9.             wp_fusion()->user->apply_tags( $settings['tag_link'], $user_id );
  10.         }
  11.     }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement