‘wpcf7_posted_data’ not working?
-
I am trying to add a custom field to my contact form 7 post data. Here is my code:
add_filter( 'wpcf7_posted_data', 'action_wpcf7_posted_data', 10, 1 ); function action_wpcf7_posted_data( $array ) { $array['paymentoption'] = "test"; return $array; }However, the array is not changed. When I submit the form , the value of “paymentoption” is not changed to test.
I also tried
$array['paymentoption'][0] = "test";That did not help.
Any clues?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘‘wpcf7_posted_data’ not working?’ is closed to new replies.