Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- PMPro Lock Membership Levels-lock existing members. Add this to your customizations plugin and refresh the page. Recommend deleting the code snippet after the operation is complete.
- */
- function bulk_lock_all_members()
- {
- global $wpdb;
- $users = $wpdb->get_results( "SELECT ID FROM $wpdb->users" );
- if( $users ) {
- foreach ( $users as $user ) {
- update_user_meta( $user->ID, 'pmprolml', 1 );
- }
- }
- }
- add_action( "init", "bulk_lock_all_members", 10, 0 );
Add Comment
Please, Sign In to add comment