Skip to content

Instantly share code, notes, and snippets.

@mralaminahamed
Created January 16, 2026 02:13
Show Gist options
  • Select an option

  • Save mralaminahamed/b33f8e07b0f9e3bacc4fad841a4eced6 to your computer and use it in GitHub Desktop.

Select an option

Save mralaminahamed/b33f8e07b0f9e3bacc4fad841a4eced6 to your computer and use it in GitHub Desktop.
update new admin email to admin email option forcely
<?php
$new_admin_email = get_option( 'new_admin_email' );
if ( $new_admin_email && get_option( 'admin_email' ) !== $new_admin_email ) {
update_option( 'admin_email', $new_admin_email );
delete_option( 'new_admin_email' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment