Skip to content

Commit

Permalink
Migrations to 4.6.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
kagg-design committed Sep 24, 2024
1 parent 74fde8b commit 747653f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/php/Migrations/Migrations.php
Original file line number Diff line number Diff line change
Expand Up @@ -370,11 +370,14 @@ protected function migrate_4_0_0(): ?bool {
protected function migrate_4_6_0(): ?bool {
$option = get_option( PluginSettingsBase::OPTION_NAME, [] );
$cf7_status = $option['cf7_status'] ?? [];
$cf7_status = array_unique( array_merge( $cf7_status, [ 'live' ] ) );

// Turn on Live Form in admin by default.
$option['cf7_status'] = array_merge( $cf7_status, [ 'live' ] );
if ( $cf7_status !== $option['cf7_status'] ) {
// Turn on CF7 Live Form in admin by default.
$option['cf7_status'] = $cf7_status;

update_option( PluginSettingsBase::OPTION_NAME, $option );
update_option( PluginSettingsBase::OPTION_NAME, $option );
}

return true;
}
Expand Down

0 comments on commit 747653f

Please sign in to comment.