Created
January 22, 2022 18:38
-
-
Save slavapas/942b46a3d5f5a1bac50d075dee48cda9 to your computer and use it in GitHub Desktop.
Contact Form 7 : How to enable shortcodes in Form and Mail Template
This file contains 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
// Contact Form 7 : How to enable shortcodes in Form and Mail Template | |
function my_special_mail_tag( $output, $name, $html ) { | |
if ( 'myshortcode' == $name ) | |
$output = do_shortcode( "[$name]" ); | |
return $output; | |
} | |
add_filter( 'wpcf7_special_mail_tags', 'my_special_mail_tag', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment