From e8b7b67f109c49197d43e4ddb520a69aab514f51 Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Mon, 16 Dec 2024 10:25:57 +0200 Subject: [PATCH] Fix #45 --- src/class-cf7-extras.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/class-cf7-extras.php b/src/class-cf7-extras.php index 549420e..a2b1f06 100644 --- a/src/class-cf7-extras.php +++ b/src/class-cf7-extras.php @@ -682,10 +682,15 @@ function maybe_reset_autop( $form ) { $disable_autop = $this->get_form_settings( $form_instance, 'disable-autop' ); if ( $disable_autop ) { - $manager = WPCF7_ShortcodeManager::get_instance(); - $form_meta = get_post_meta( $form_instance->id(), '_form', true ); - $form = $manager->do_shortcode( $form_meta ); + + if ( class_exists( 'WPCF7_FormTagsManager' ) ) { + $manager = WPCF7_FormTagsManager::get_instance(); + $form = $manager->replace_all( $form_meta ); + } else { + $manager = WPCF7_ShortcodeManager::get_instance(); + $form = $manager->do_shortcode( $form_meta ); + } $form_instance->set_properties( array(