There are many great code snippets in their Gitlab. You might find more on their…
Force change admin email and current user email without notification via functions.php
Add this and reload the page, then remove it from functions.php. This is useful if your server does not send emails 8yet) or ayou dont want toe prior admin to know about your changes.
//force update admin email
update_option( 'admin_email', 'info@enym.com' );
update_option( 'new_admin_email', 'info@enym.com' );
//force update current user email
$args = array(
'ID' => $current_user->id,
'user_email' => 'info@enym.com'//esc_attr( $_POST['user_email'] )
);
wp_update_user( $args );
Dieser Beitrag hat 0 Kommentare