Advertisement
verygoodplugins

Untitled

Apr 3rd, 2020
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.46 KB | None | 0 0
  1. add_filter( 'wpf_import_user', 'maybe_skip_import' );
  2. function maybe_skip_import( $user_meta, $contact_id ) {
  3.     $tags = wp_fusion()->crm->get_tags( $contact_id );
  4.     if( have_rows('exclude_tags_from_wpfusion_sync','options') ):
  5.          while( have_rows('exclude_tags_from_wpfusion_sync') ): the_row();
  6.             // vars
  7.             $tag = get_sub_field('tag');
  8.             if ( in_array( $tag, $tags ) ) {
  9.         return null;
  10.         }
  11.  
  12.         endwhile;
  13.         endif;
  14.     return $user_meta;
  15.  
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement