Thanks for your post.
I don’t see other way except bulk approve.
I should add this feature to automatically update existing user to marked as approved.
Regards
Hi, I wrote a plugin to do that on my own, yes, I think that you should add this feature… it’s impossible to use the WP bulk action for thousands users.
This is the code:
if ( current_user_can( 'manage_options' ) ){
// you can use role => Customer for woocommerce
$wp_user_query = new WP_User_Query(array('role' => 'Subscriber', 'number' => $number, 'offset' => $offset));
// Get the results
$users = $wp_user_query->get_results();
// Check for results
if (!empty($users)) {
foreach ($users as $user)
{
// set the activation status on approved
update_user_meta( $user->id, 'user_activation_status', '1' );
}
}
}
You need to handle the $number and $offset variables to avoid server timeout, maybe you can use multiple ajax call to split the job in multiple jobs.
Another way is to handle this process through an SQL query.
Bye
-
This reply was modified 6 years, 11 months ago by
ulver85.
Thanks for your code, i will try to add in next plugin release.
Regards