We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 90c1775 commit 8a55d61Copy full SHA for 8a55d61
themes/osi/functions.php
@@ -439,7 +439,7 @@ function osi_wpdc_comment_body( string $comment_body ) {
439
*/
440
add_action('wpcf7_before_send_mail', 'save_form_data_to_cpt');
441
function save_form_data_to_cpt($contact_form) {
442
- $submission = WPF7_Submission::get_instance();
+ $submission = WPCF7_Submission::get_instance();
443
if ($submission) {
444
$data = $submission->get_posted_data();
445
@@ -450,5 +450,7 @@ function save_form_data_to_cpt($contact_form) {
450
));
451
update_field('name', $data['your-name'], $post_id);
452
update_field('organization', $data['your-org'], $post_id);
453
- }
+ } else {
454
+ error_log('WPCF7_Submission instance is null.');
455
+ }
456
}
0 commit comments