Skip to content

Commit

Permalink
Fix #45
Browse files Browse the repository at this point in the history
  • Loading branch information
kasparsd committed Dec 16, 2024
1 parent 0917476 commit e8b7b67
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/class-cf7-extras.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit e8b7b67

Please sign in to comment.