First of all if you are already checking if the field is empty with that function, there’s no need to use * in the backoffice [email* your-email].
In any case, it’s not working because is_required()
executes first than your function.
Solutions:
1) Remove the * in the backend
OR
2) Change the priority
// From 20 to 5 should work
// You only need to apply this to this filter as it is the one for required fields
add_filter( 'wpcf7_validate_email*', 'custom_email_confirmation_validation_filter', 5, 2 );
Hope it helps!
Related Posts:
- How to modify Contact Form 7 Success/Error Response Output [closed]
- Contact Form 7 filter similar to preprocess_comment [closed]
- Contact Form 7: Make field required after checkbox is checked
- Background color and background image below element in Contact Form 7 – error tip [closed]
- Adding filter to the Contact Form 7 response
- WordPress hooks/filters insert before content or after title
- What is the very earliest action hook you can call?
- Query WP REST API v2 by multiple meta keys
- Removing Image and Caption Dimension Attributes
- is it possible to add “extra” table nav to edit-tags.php screens?
- How to apply the “retrieve_password_message” filter?
- wp_mail – Remove sitename from email subject
- Remove left alignment option in core/image block
- How to change/rewrite the lost password url?
- add_filter multiple times with different addon functions?
- WP Rest API – Upload media without saving attachment post
- Using variable from one filter in another filter
- What effect does the_content filter have on performance?
- add class to term_description
- How can I find out what an `apply_filter` call is actually doing?
- How to apply content filter permanently?
- remove other tabs in new wordpress media gallery
- Customize the “Registration complete. Please check your e-mail.” message on WP 4.0
- posts_groupby problem
- Remove classes from post_class()
- How can I register a new REST context?
- How to stop WordPress from changing ellipsis into a pre-composed triple-dot glyph?
- Replace a part of url generated by get_term_link
- Error when overriding only some audio shortcode HTML output
- Filter category in WooCommerce shop page to display related sub-category
- Run oembed separately outside the_content()
- Hook Into the_content Filter For JSON API Only [closed]
- Is possible dequeue/remove style from wp_footer() hook and add on wp_head() hook?
- How to call a function or method that is Namespaced using another plugin
- Where is the changelog for 3.5? where is the list of added removed files?
- Change username before login
- apply_filters(‘the_content’) – make it ignore shortcodes?
- Replace a word with a word in the URL string
- When does wordpress process <!–nextpage–>
- Remove style `?ver=` from `/wp-admin/upgrade.php`
- Add attribute to script loaded by the theme
- theme_page_templates not working
- Filter custom post type using multiple taxonomy dropdowns
- Add new post with predefined / preset date
- Remove Actions added by SEO ultimate Plugin
- Contact Fom 7 – how to add custom HTML inside span.wpcf7-form-control-wrap AND IMMEDIATELY AFTER input.wpcf7-form-control?
- Remove Extra Classes from Post Title
- Building a request processor for multi-page forms, etc using $_GET requests
- Replace audio links with jplayer using the_content filter
- Sorting a specific taxonomy by archive date using URL
- Add filter menu to admin list of posts (of custom type) to filter posts by custom field values
- Modify Redux Framework Options in Child Theme
- How to allow code block in wordpress comments
- get_post() containing gallery is outputting an unmatched closing div at the end of the content
- Trouble using remove_filter to override function in parent theme
- How to add attributes to WordPress Admin Sub Menu List Items
- How do I hook my function to run only after submitting login form
- Prepending character(s) to a custom tag title?
- How to write a filter to remove a form field (WordPress) [closed]
- Why doesn’t this function work when I know that the IP Address is “true”?
- Modify existing plugin function with add_filter
- include specific Pages to wp_list_pages with filter
- Map plugin with proximity search compatible with Buddypress
- Create a pre-filtered version of the Media Library
- How to filter Sidebar Content
- Removing URL and adding container around image in the featured image metabox
- Email Obfuscation: Is antispambot() Acceptable? [closed]
- How would I use a filter to remove header banner on certain post types
- What are the steps + prerequisites for using an add_filter?
- an action hook when a post reaches a certain number of views
- WordPress overwrites UNC
- Excluding posts by meta, and also keeping posts without the meta
- Change tags url to search different site
- Replace Data In Post & Update Meta Field Post Is Saved
- How to optionally append components to the output of a gutenberg block?
- How to add custom media library mime icons?
- Custom SQL query slows down when using multiple OR … LIKE … in posts_where filter
- Customising the default wordpress search functionality
- get_post() with filters applied
- Ajax filter – show all results that contain at least one filter
- WP_Query filter by custom meta
- Drop down filter sort posts by latest, last 7 days and monthly
- Function not returning correct value for found_posts filter
- How to add a blog filter bar without paying money. (example inside)
- Unable to defer loading of jquery
- Override admin selected page layout
- WordPress: Issue with filtering users using date range
- Does anybody know what the $current_screen ->id for customizer.php is?
- Login logout below menu bar
- Add HTML to the bottom of each post in a post list
- URL to filter posts by post meta similar to shop/?product_cat=”painting”
- Incrementing content with extra text after save/publish
- wordpress filtering out caps in wp_title? (UpperCase is changed to Uppercase)
- What scope is $blog_url = get_bloginfo() inside a function
- Turn wp_tag_cloud into a front-end filter
- How we make the filter for fornt end user
- Add HTML to Page Content
- Filter dashboard custom post listing by user
- How to filter part of a variable if it is no array?
- Limit total tags in the_content