Skip to content

Commit e23264c

Browse files
committed
Add post data as a second param in form validation hook.
1 parent 9aef0fb commit e23264c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

includes/class-mailchimp-form-submission.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,8 +505,9 @@ protected function validate_form_submission() {
505505
* Filter to allow for custom validation of the form submission.
506506
*
507507
* @since x.x.x
508-
* @param bool $is_valid True if valid, false if invalid, return WP_Error to provide error message.
508+
* @param bool $is_valid True if valid, false if invalid, return WP_Error to provide error message.
509+
* @param array $post_data The $_POST data.
509510
*/
510-
return apply_filters( 'mailchimp_sf_form_submission_validation', true );
511+
return apply_filters( 'mailchimp_sf_form_submission_validation', true, $_POST );
511512
}
512513
}

0 commit comments

Comments
 (0)