Skip to content

Instantly share code, notes, and snippets.

@rcstr
Last active December 7, 2018 23:41
Show Gist options
  • Save rcstr/b34503abe80f11290d2fce921f0cf67e to your computer and use it in GitHub Desktop.
Save rcstr/b34503abe80f11290d2fce921f0cf67e to your computer and use it in GitHub Desktop.
Get users that have an active Subscription.
<?php
$roles = wcs_get_new_user_role_names( 'default_subscriber_role' );
get_users( array(
'role__in' => array(
$roles['new']
)
) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment