Created
January 16, 2026 02:13
-
-
Save mralaminahamed/b33f8e07b0f9e3bacc4fad841a4eced6 to your computer and use it in GitHub Desktop.
update new admin email to admin email option forcely
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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