Support

Account

Forum Replies Created

  • Hello, i think this is related to this topic. I have this code and doesn’t work.
    If i use just one category is ok but i don’t know how to use more that one. Can someone helps me please?

    <?php
    $categories = array(8,9);
    
    $args = array(
    	'role__in' => 'subscriber',
    	'meta_query' => array(
    		array(
    			'key' => 'field_648831166ce8e',
    			'value' => $categories,
    			'compare' => 'LIKE',
    		),
    	),
    	'fields' => array('user_email'),
    );
    
    $subscribers = get_users($args);
    
    foreach ($subscribers as $subscriber) {
    	echo '<span>' . esc_html($subscriber->user_email) . '</span>';
    }
    ?>
  • I have the same issue, please say me how to fix

Viewing 2 posts - 1 through 2 (of 2 total)