• Resolved Frank

    (@frankswift)


    Hi there,

    I’m using a code snippet to disable password change notifications sent to admin, this particular code is something that can’t be added to the theme functions because pluggable.php is what controls this, and it loads before the theme functions does (as I understand it).

    if ( !function_exists( 'wp_password_change_notification' ) ) {
        function wp_password_change_notification() {}
    }
    

    However, it’s having no impact on disabling the password notifications, and I’m not sure why, since this is being called inside Code Snippets, which is a plugin?

    Any assistance appreciated!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Shea Bunge

    (@bungeshea)

    Hey,

    In order to maintain consistency, snippets actually run on the plugins_loaded hook, which is after pluggable.php has loaded. This means that unfortunately at this point it is not possible to override pluggable functions using snippets.

    I’ll look into providing more control over how early snippets are run in a future version of the plugin.

    Thread Starter Frank

    (@frankswift)

    Thanks for the explanation!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Snippet Not Affecting Notifications’ is closed to new replies.