You should do it like so:
add_action( 'wpcf7_init', 'custom_add_form_tag_my_source' );
function custom_add_form_tag_my_source() {
// "my-source" is the type of the form-tag
wpcf7_add_form_tag( 'my-source', 'custom_my_source_form_tag_handler' );
}
function custom_my_source_form_tag_handler( $tag ) {
return isset( $_COOKIE['my_source'] ) ? $_COOKIE['my_source'] : '';
}
See the documentation for more details.
Or you can also try this, to parse regular shortcodes:
add_filter( 'wpcf7_mail_components', function( $components ){
$components['body'] = do_shortcode( $components['body'] );
return $components;
} );
Related Posts:
- Integrate Razorpay quick payments plugin with contact form7 plugin
- How to customise the output of the WP image gallery shortcode from a plugin?
- Custom media upload content for inserting custom post shortcode
- Checking if an attribute exists in a shortcode
- All shortcodes not working on custom theme
- enqueue script only if it is not already enqueue
- Shortcode output appears before post body [duplicate]
- PHP Deprecated: Non-static method should not be called statically
- How to parse nested shortcodes?
- How to call shortcode function directly and pass $atts
- How to pass multiple values in shortcode?
- change plugin shortcode function [closed]
- Calling function from within functions.php returns unwanted value
- Dynamic HTML not displaying at respective place
- Contact Form 7 plugin refreshing page on submit [closed]
- Plugin form unable to process
- Short code for Venues
- Frontend editing, Frontend user dashboard
- Can’t get custom posts of taxonomy to show
- Shortcode doesn’t work if I directly paste its function in a template file?
- Pass variable to nested shortcode
- get shortcode value
- Can’t send mails using contact plugin [closed]
- Storing Options in a Shortcode
- Prevent shortcode from being wrapped in tags
- How can I create a custom shortcode that will return a custom post type by ID?
- Plugin Handle URL With Custom Theme
- AddToAny shortcode in the loop
- How to fix wrong attribute error for Visual Composer Grid Builder?
- Making a Template for a CPT created by a plugin
- Shortcode Plugin to dynamically build a shortcode via `do_shortcode` not working
- Creating shortcodes in plugin
- Visual Composer shortcode for child theme dir
- Inject HTML meta tag inside wordpress tag using add_shortcode
- Redirect to another page using contact form 7? [closed]
- My plugin won’t return anything [closed]
- Shortcode to update user meta
- Why shortcode always displayed after footer not in body
- Why am I unable to load scripts in head in plugin?
- Deactivate JS Script in Plugin Shortcode
- Where to find the code used to render a page that has a shortcode and a template defined?
- Shortcode not working after move wordpress website files
- Contact Form 7 – Form name blank [closed]
- WordPress contact form 7 to show the form dropdown menus as like [closed]
- convert more tag to shortcode
- Shortcode does not expand in Facebook like
- Plugin that provides the [edit] shortcode?
- Return multiple values in a shortcode attribute
- How to change shortcode’s default theme?
- Override/ignore CSS from active theme as not to interfere with my custom CSS
- Is there a way to convert shortcodes to html content?
- How to use template inside plugin shortcode with variables for big HTML code
- Loop returns the current page’s permalink and guid instead of the post in the loop
- How to rewrite URL and get the values?
- Shortcode and variable
- How can I achieve this, using shortcodes
- Contact Form 7 “non-selectable” options in a drop down [closed]
- In wordpress how to sent different email separetly when i click on different email ids [closed]
- value not set in contact form 7 plugin of wordpress [closed]
- Elementor Pro display featured image on section -> style -> image using shortcode
- Creating New Dynamic Fields for a Certificate (Number Generation, Code Referencing, and more)
- Push Contact form 7 variable to front end after submission
- Can I add Short Code Of A Plugin In The Code Editor of WordPress?
- How to check if short code is present in template?
- Shortcode show error while editing post
- Get Shortcode output to database for static post_content
- How can I implement radio buttons with icons in Contact form 7?
- Issue Saving Posts That Contain Shortcode
- Using Shortcode Result In Custom HTML Block (Using Google Sheet JQuery Result As NumScroller data-max)
- Hide button after form submit and save state to localstorage
- How to use plugin’s shortcode in custom design? [closed]
- Multiple CF7 Forms causing multiple recaptcha requests
- WordPress show descriptions under images in gallery
- WP Plugin CSS not being applied to page
- Modify Plugin PHP Class in Child Theme – Correct Method
- How to add HTML to a template only when user is logged out/ not registered
- Multiple calling javascript from shortcode in one page
- How to pass value to a plugins shortcode?
- Is it possible to get a shortcode generated by a plugin, then, using a function, create a new post using that shortcode?
- Find all strings between an enclosing shortcode
- Hide some shortcodes on posts from back-end
- Trouble implementing python on WordPress
- Is there a function to search for a wildcard value when calling a shortcode?
- How to display single arbitrary facebook post with a shortcode?
- Multiple level shortcodes
- Custom shortcode with dynamic rewrite
- Posting code inside the post instead of in the template file using shortcode
- apply_filters to content but ignore shortcodes
- How to load a plugin when doing an Ajax call? [duplicate]
- Is it right way to create shortcode?
- Trying to override/intercept a PhotoMosaic gallery link in WordPress using jQuery
- Retrieving old forms in Contact Form 7 [closed]
- Integrate Mailchimp to a Contact Form 7 contact form [closed]
- Creating Features List in WordPress Post
- How to do Conact form 7 name field validation? [closed]
- I am experiencing difficulty fulfilling client request
- Subtract Using GravityWP Count Plugin
- qTranslate‑X is not translating all shortcodes
- Shortcode cannot parse attributes within double quotes. ” is becoming ” breaking my shortcode
- Problem with a shortcode generating a error [closed]