Skip to content

Instantly share code, notes, and snippets.

@ultimatemember
ultimatemember / gist:02311172f7b42adeb3ed
Last active January 17, 2018 07:12
Delete display_name usermeta from all users
$users = get_users( array('fields' => 'ID') );
foreach( $users as $user_id ) {
delete_user_meta( $user_id, 'display_name' );
}
@ultimatemember
ultimatemember / gist:08c7f3369f49021cb749
Last active April 4, 2018 14:20
How to stop registration using Ultimate Member action hooks
/*
You need to hook into um_submit_form_errors_hook with a
priority over 10.
You can stop registration here if the customer_code field does not
match the value you want "ALLOWED_VALUE" in this example
*/