Advertisement
verygoodplugins

Untitled

Jun 11th, 2020
1,032
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.54 KB | None | 0 0
  1. function custom_limit_users( $user_ids ) {
  2.  
  3.     $args = array(
  4.         'number'       => 60000,
  5.         'role__not_in' => 'learner',
  6.         'fields'       => 'ID',
  7.         'meta_query'   => array(
  8.             'relation' => 'OR',
  9.             array(
  10.                 'key'     => wp_fusion()->crm->slug . '_contact_id',
  11.                 'compare' => 'NOT EXISTS',
  12.             ),
  13.             array(
  14.                 'key'   => wp_fusion()->crm->slug . '_contact_id',
  15.                 'value' => false,
  16.             ),
  17.         ),
  18.     );
  19.  
  20.     $user_ids = get_users( $args );
  21.  
  22.     return $user_ids;
  23.  
  24. }
  25.  
  26. add_filter( 'wpf_batch_users_register_init', 'custom_limit_users', 20 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement