Using the following modifications and adding in die() stopped the script and output whatever the variables value was at that time.
Thanks to @toscho
function cf7pp_after_send_mail( $contact_form ) {
global $postid;
$submission = WPCF7_Submission::get_instance();
if ( $submission ) {
$posted_data = $submission->get_posted_data();
$postid = $posted_data['_wpcf7'];
$enable = get_post_meta( $postid, "_cf7pp_enable", true);
$email = get_post_meta( $postid, "_cf7pp_email", true);
$valuepassed = get_post_meta($post_id, "_cf7pp_text_menu_b", true);
if ($enable == "1") {
// if ($valuepassed == "1") {
if ($email == "2") {
die( $valuepassed );
// include_once ('includes/redirect.php');
exit;
}
// }
}
}
}
Related Posts:
- Can wp_list_comments output into variable?
- How to include PHP files in plugins the correct way
- How can you check if you are in a particular page in the WP Admin section? For example how can I check if I am in the Users > Your Profile page?
- Why does WordPress add 0 (zero) to an Ajax response?
- Passing arguments to a admin menu page callback?
- function deactivate_plugins does not exist
- What is an alternative method to the WordPress private _doing_it_wrong() function
- Understanding WordPress functions’ naming conventions
- How to add multiple custom URL variables?
- Using OOP plugin’s methods throughout the website
- function triggered by “manage_users_custom_column” filter not working
- How can I change the frequency of a scheduled event?
- WordPress plugin how to run function when button is clicked
- When is it appropriate to put functions on page template vs. functions.php?
- Shortcodes, output buffering, and WordPress functions
- How can i list current author’s categories?
- Determine which theme location a wp_get_nav_menu_items is for
- Checking for existence of a page by title?
- Problems with removing admin bar
- Check if I am in the Admin Panel (wp-admin)?
- What is the Difference between directly call a function and call a function using add_action?
- Call to undefined function get_blog_option()
- Use of global variables within plugin [closed]
- What is the difference between current_page_parent and current_page_ancestor?
- Undefined function wp_set_password
- Does add_filter work outside functions.php
- What function to hook for changes made in status and visibility of a post
- how to use preg_replace for wordpress video?
- Plugin Uninstall and Deactivate via Options Menu
- How can I add a CSS rule to edit.php?
- wp_enqueue_script + wp_enqueue_style Since When
- add more custom post types and custom role to the code
- Enqueue scripts in footer
- Retrieve contents/page names of various pages for use in a plugin
- is user logged in not working
- Can I change header.php of current theme through a plugin function?
- get_current_screen() return null
- Override class inside $atts shortcode_atts in WordPress
- add_rewrite_rule works in themes function php but when moved into plugin it stops working
- How to fix Uninitialized string offset: error on a checkbox in WP Settings API
- Where can i find wordpress auto update code flows?
- correct way to call javascript into hook function
- Append varible to url or set session
- How to change the hover content of a specific menu item on WordPress?
- how to search users by ajax live search
- Remove unwanted elements for a wp_nav_menu
- How do I update a field of a meta box?
- How to add user details to different tables immediately after user registration
- mysql_real_escape_string() vs. esc_sql() in WordPress
- WordPress function get_the_terms() returns ‘Invalid taxonomy’ error
- Checking for existence of a page by title?
- how to get context information inside my funcion
- How to modify files inside wp-includes directory in wordpress
- Fatal error: Call to a member function get_page_permastruct() on a non-object
- wp_get_post_terms Order by not working
- Function/Class to list categories with checkboxes
- wp_get_theme Warning: Illegal offset type
- Why wp_die() doesn’t work with wp_redirect but exit() works
- Autogenerate a Table of Contents
- Alternative functions for mysql_free_result and mysql_ping in wordpress functions
- WordPress multisite,use same cookies across all website?
- Apply styles to blockquote element with the WYSIWYG editor
- unregister_setting() vs delete_option() for plugin update
- How to change WooCommerce loop product title HTML output in single product page and archive page
- How to output functions from plugin inside theme
- How can I programmatically change a MySql variable (foreign_keys_check)?
- Custom Post Type Object – Undefined Variables
- Overwriting a plugin function
- Writing editor content to a file
- Adding tables to dashboard pages programmatically?
- Modify code for functions.php with specific twitter user url and hashtags
- can’t access some WordPress function from my plugin
- WP 3-way voting system: On to something! Please help!
- Custom Settings Plugin Save foreach checkboxes
- Customise Grouped Product display in Woocommerce with custom column
- Can someone explain what’s the use of parse request function in WordPress?
- Add default value from selection
- function add custom fields to media gallery
- Override category archive page title (not the head title)
- Make visible page only in the trash
- WordPress: I wanted to use Add rewrite rule multiple times for multiple CPT in my plugin
- Why would one specify multiple arguments when using get_previous_posts_link() which takes only one parameter?
- I cant add is_admin control to plugin
- WordPress Ajax not returning Response
- Does hooking into a plugin action / filter override the plugin’s function for that hook?
- Remove tag from all posts when publishing new post
- WordPress plugin how to run function when button is clicked
- Add function to Dokan ajax class
- Remove from a div by class name from post page if post author role is not administrator
- Function not working on any file other than the main plugin file
- Building WordPress Themes With Bootstrap with Adi Purdila → TutsPlus
- Ajax not working to insert, query and result data
- WordPress permalink setting
- How to add chunk of php, html, and sql code to variable an append to $content
- Dynamic banner for use on external sites
- How can i call from custom fields to the category editor?
- Custom options page for themes
- Why does this fail: Disabling plugins enqueue_script() in functions.php
- Call do_action() within WordPress cronjob
- get_term_by() returning null on plugin