-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from mailchimp/feat/removes-monkeyrewards
Removes Monkey Rewards
- Loading branch information
Showing
7 changed files
with
45 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
/** | ||
* Upgrade routines. | ||
* | ||
* @package Mailchimp | ||
*/ | ||
|
||
/** | ||
* Check plugin version. | ||
* | ||
* @since 1.6.0 | ||
* @return void | ||
*/ | ||
function mailchimp_version_check() { | ||
$db_option = get_option( 'mc_version' ); | ||
|
||
if ( MCSF_VER === $db_option ) { | ||
return; | ||
} | ||
|
||
if ( false === $db_option || version_compare( '1.6.0', $db_option, '>' ) ) { | ||
mailchimp_update_1_6_0(); | ||
} | ||
|
||
update_option( 'mc_version', MCSF_VER ); | ||
} | ||
|
||
add_action( 'plugins_loaded', 'mailchimp_version_check' ); | ||
|
||
/** | ||
* Version 1.6.0 update routine | ||
* - Remove MonkeyRewards checkbox option | ||
* | ||
* @return void | ||
*/ | ||
function mailchimp_update_1_6_0() { | ||
delete_option( 'mc_rewards' ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters