fast_events_order_mail
The filter is called for every new order. Filter the email address and return a WP_Error if necessary.
1<?php
2function your_filter_order_mail( $email ) {
3 if ( str_ends_with( $email, 'exampledomain.com' ) ) {
4 return new WP_Error( 'invalid_email', 'An email address from this domain is not allowed', array( 'status' => 400 ) );
5 }
6 return $email;
7}
8
9add_filter( 'fast_events_order_mail', 'your_filter_order_mail', 10, 1 );
Parameters
(string) Email address of the buyer.
Return
(string | WP_Error) The email address or WP_Error.
Changelog
Version |
Description |
---|---|
2.2.0 |
Introduced. |