Last active
January 14, 2022 13:20
-
-
Save erikyo/a270969da4ea86c6d5d8321b77e64e4d to your computer and use it in GitHub Desktop.
Contact Form 7 - replace mail content / posted data (in this example replace the email appending the support email domain)
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
| <?php | |
| function prefix_replace_email( $posted_data ) { | |
| $posted_data[ 'your-email-backup' ] = $posted_data[ 'your-email' ] ; | |
| $posted_data[ 'your-email' ] = str_replace('@', 'A', $posted_data[ 'your-email' ]) . '@mysupport.com' ; | |
| return $posted_data; | |
| } | |
| add_filter( 'wpcf7_posted_data', 'prefix_replace_email' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment