<?php | |
$args = array( | |
'role' => 'Subscriber', | |
'fields' => 'ID' | |
); | |
$users = new WP_User_Query( $args ); | |
// If we have users | |
if( $users->results ) {...} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment