The contact-form-7 wpcf7 messages hook.
Published Date - July 22, 2023
return apply_filters( 'wpcf7_messages', $messages );
$messages
The following example is for adding a hook callback.
// define the wpcf7_messages callback
function custom_wpcf7_messages( $messages ){
//custom code here
return $messages
}
//add the action
add_filter('wpcf7_messages', 'custom_wpcf7_messages', 10, 1)
The filter is defined in the following location(s).
contact-form-7/includes/contact-form-template.php
return apply_filters( 'wpcf7_messages', $messages );