Skip to content

v1.3.2 — Block third-party registration notification emails

Latest

Choose a tag to compare

@schlebek schlebek released this 27 May 20:59

What's changed

Fixed

  • Admin notification emails from third-party plugins are now suppressed.
    Some plugins send their own "New User Registration" admin email outside of WordPress's wp_new_user_notification() — before or independently of wp_insert_user(). In those cases the wp_new_user_notification_email_admin filter never fires (because user creation is already blocked at wp_pre_insert_user_data), so the email slipped through.

    A new pre_wp_mail filter (priority 1) now intercepts wp_mail() directly: if the recipient matches the site admin email and the subject contains a known registration keyword (rejestracja nowego / new user registration), the email is silently discarded. Emails sent by a logged-in admin with the create_users capability are not affected.

  • wp_new_user_notification_email_admin priority bumped to PHP_INT_MAX — ensures no other plugin hooked at a higher priority can re-enable the notification after Registration Blocker suppresses it.

Upgrade notes

Drop-in replacement for 1.3.1 — no settings changes required.