Created
September 27, 2025 10:31
-
-
Save propertyhive/f0a047c417fe221dc148a9cc4b014998 to your computer and use it in GitHub Desktop.
Disable property enquiry emails from sending
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
| add_filter( 'wp_mail', 'stop_property_enquiry_email' ); | |
| function stop_property_enquiry_email( $args ) { | |
| if ( isset( $args['subject'] ) && strpos( $args['subject'], 'Property Enquiry' ) !== false ) { | |
| // Return false to completely cancel the email. | |
| return false; | |
| } | |
| return $args; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment