PluginProbe
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO / 1.4.17
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO v1.4.17
1.4.17 1.4.16 1.4.15 1.4.14 1.4.13 1.4.12 1.4.11 1.4.10 1.4.9 1.4.8 1.4.7 1.4.6 1.4.5 1.4.4 1.4.3 1.4.2 1.4.1 1.4.0 1.3.54 1.3.53 1.3.52 1.3.51 1.3.50 1.3.49 1.3.48 All 180 releases
← All changes | libs/ActiveCampaign/ActiveCampaign.php +4 -4 1.3.521.4.17 View file →
@@ -18,11 +18,11 @@
18 18 }
19 19
20 20 /**
21 21 * Option flag set once the user has submitted their email.
22 - * Works like a notice-dismiss flag: only '1' is stored, never the email.
22 + * Works like a notice-dismiss flag: only `true` is stored, never the email.
23 23 */
24 -define( 'DISCO_AC_OPTION_KEY', 'disco_activecampaign_email_collected' );
24 +define( 'DISCO_AC_OPTION_KEY', 'disco_active_campaign_subscribe' );
25 25
26 26 /**
27 27 * AJAX action name.
28 28 */
@@ -38,9 +38,9 @@
38 38 *
39 39 * @return bool
40 40 */
41 41 function disco_activecampaign_has_subscriber() {
42 - return '1' === get_option( DISCO_AC_OPTION_KEY );
42 + return (bool) get_option( DISCO_AC_OPTION_KEY, false );
43 43 }
44 44
45 45 /**
46 46 * Data localized for the React app.
@@ -73,9 +73,9 @@
73 73 if ( ! current_user_can( 'manage_options' ) && ! current_user_can( 'manage_woocommerce' ) ) {
74 74 wp_send_json_error( array( 'message' => __( 'You are not allowed to do this.', 'disco' ) ), 403 );
75 75 }
76 76
77 - update_option( DISCO_AC_OPTION_KEY, '1', false );
77 + update_option( DISCO_AC_OPTION_KEY, true, false );
78 78
79 79 wp_send_json_success(
80 80 array(
81 81 'message' => __( 'Thanks! You are subscribed.', 'disco' ),