Skip to content

Commit 8a55d61

Browse files
author
Ariel Jolo
committed
Fixing WPCF typo
1 parent 90c1775 commit 8a55d61

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

themes/osi/functions.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ function osi_wpdc_comment_body( string $comment_body ) {
439439
*/
440440
add_action('wpcf7_before_send_mail', 'save_form_data_to_cpt');
441441
function save_form_data_to_cpt($contact_form) {
442-
$submission = WPF7_Submission::get_instance();
442+
$submission = WPCF7_Submission::get_instance();
443443
if ($submission) {
444444
$data = $submission->get_posted_data();
445445

@@ -450,5 +450,7 @@ function save_form_data_to_cpt($contact_form) {
450450
));
451451
update_field('name', $data['your-name'], $post_id);
452452
update_field('organization', $data['your-org'], $post_id);
453-
}
453+
} else {
454+
error_log('WPCF7_Submission instance is null.');
455+
}
454456
}

0 commit comments

Comments
 (0)