Created
August 9, 2023 11:04
-
-
Save amans2k/6cc128877740190dc594df6c7dc72b81 to your computer and use it in GitHub Desktop.
FunnelKit: Disable New User register native notification
This file contains 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 | |
/** | |
* This will unhook user registeration emails | |
*/ | |
add_filter( 'init', function () { | |
remove_action( 'network_site_new_created_user', 'wp_send_new_user_notifications' ); | |
remove_action( 'network_site_users_created_user', 'wp_send_new_user_notifications' ); | |
remove_action( 'network_user_new_created_user', 'wp_send_new_user_notifications' ); | |
remove_action( 'register_new_user', 'wp_send_new_user_notifications' ); | |
remove_action( 'edit_user_created_user', 'wp_send_new_user_notifications' ); | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment