Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update/version #106

Merged
merged 3 commits into from
Jan 26, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
should improve the experience for reset/uninstall
erikyo committed Jan 26, 2024
commit 7de82d502c39c1dfc0f14cf14178aaf8e783494b
6 changes: 5 additions & 1 deletion engine/CF7_AntiSpam_Uninstaller.php
Original file line number Diff line number Diff line change
@@ -36,6 +36,10 @@ public static function cf7a_full_reset() {
self::uninstall( false );
CF7_AntiSpam_Activator::install();

// reset options
update_option( 'cf7a_db_version', '1' );
CF7_AntiSpam_Activator::update_options( true );

return true;
}

@@ -81,7 +85,7 @@ protected static function cf7a_plugin_drop_options() {
* @param bool $force If set to true, the cf7-antispam database and options tables delete will be forced otherwise it will be skipped.
*/
public static function uninstall( $force = true ) {
if ( ( defined( CF7ANTISPAM_DEBUG_EXTENDED ) && CF7ANTISPAM_DEBUG_EXTENDED === true ) || ! $force ) {
if ( ( defined( CF7ANTISPAM_DEBUG_EXTENDED ) && CF7ANTISPAM_DEBUG_EXTENDED === true ) || $force === false ) {
cf7a_log( 'CONTACT FORM 7 ANTISPAM - constant "CF7ANTISPAM_DEBUG_EXTENDED" is set so options and database will NOT be deleted.' );
return false;
} else {