File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Upgrade routines.
4
+ *
5
+ * @package Mailchimp
6
+ */
7
+
8
+ /**
9
+ * Check plugin version.
10
+ *
11
+ * @since 1.6.0
12
+ * @return void
13
+ */
14
+ function mailchimp_version_check () {
15
+ $ db_option = get_option ( 'mc_version ' );
16
+
17
+ if ( MCSF_VER === $ db_option ) {
18
+ return ;
19
+ }
20
+
21
+ if ( false === $ db_option || version_compare ( '1.6.0 ' , $ db_option , '> ' ) ) {
22
+ mailchimp_update_1_6_0 ();
23
+ }
24
+
25
+ update_option ( 'mc_version ' , MCSF_VER );
26
+ }
27
+
28
+ add_action ( 'plugins_loaded ' , 'mailchimp_version_check ' );
29
+
30
+ /**
31
+ * Version 1.6.0 update routine
32
+ * - Remove MonkeyRewards checkbox option
33
+ *
34
+ * @return void
35
+ */
36
+ function mailchimp_update_1_6_0 () {
37
+ delete_option ( 'mc_rewards ' );
38
+ }
You can’t perform that action at this time.
0 commit comments