Support » Plugin: WooCommerce MailChimp » Make Opt-in checkbox required

  • tobbbe

    (@tobbbe)


    Is it possible to make the opt-in checkbox required? Preventing the customer to checkout if they haven’t opted in.

    • This topic was modified 1 year ago by  tobbbe.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Saint Systems

    (@saintsystems)

    @tobbbe,

    If you want to force customers to subscribe, your best bet is to just set the plugin to subscribe customers automatically.

    Jaiji

    (@jaiji)

    It’s not a question of forcing a subscription automatically, it’s a question of not allowing a subscription unless the consent checkbox is checked i.e. make the consent field a required field. Is it? Proactive consent is a GDPR requirement, implied consent is not permitted.

    Ambyomoron

    (@josiah-s-carberry)

    I am curious to understand why a checkbox might be needed in addition to whatever button is clicked? If you have a label saying, “By clicking this button you give us permission to use your personal data….”, why do you need a checkbox in addition to that? Please don’t tell me it is a GDPR requirement, because that law says nothing about checkboxes. It just requires, as you say, proactive consent.

    Plugin Contributor Saint Systems

    (@saintsystems)

    Can’t this be achieved using MailChimp double opt-in or by indicating the proactive consent in the checkbox label and defaulting to unchecked?

    We’re open to modifying the behavior if there is truly a need or GDPR requirement that the plugin does not support but not necessarily if it’s a preference for how to implement a GDPR requirement if the plugin already meets the need.

    If you need to customize the checkbox behavior, you can extend the plugin through custom code and make the checkbox required, inialize a dialog for additional consent when the user checks the box, etc.

    You can hook into the ss_wc_mailchimp_opt_in_checkbox filter. Here’s the example usage:

    add_filter( 'ss_wc_mailchimp_opt_in_checkbox', function( $value, $checkbox_default, $label ) {
          return '<p class="form-row woocommerce-mailchimp-opt-in"><input type="checkbox" name="ss_wc_mailchimp_opt_in" id="ss_wc_mailchimp_opt_in" class="input-checkbox" value="yes"' . ($checkbox_default == 'checked' ? ' checked="checked"' : '') . '/> <label class="checkbox" for="ss_wc_mailchimp_opt_in">' . esc_html( $label ) . '</label></p>';
            }, 10, 3 );
    

    You can customize the output based on your own logic.

    Or, there are two other action hooks you can hook into if you prefer that run before and after the opt_in_checkbox. They are ss_wc_mailchimp_before_opt_in_checkbox and ss_wc_mailchimp_after_opt_in_checkbox. You could hook into those and output a wrapper starting div tag and ending doc tag, add hyperlinks to your GDPR terms and conditions, consent, etc., or output some custom JavaScript that hides the checkout button until the checkbox is checked.

    Plugin Contributor Saint Systems

    (@saintsystems)

    @josiah-s-carberry,

    You can also use the hook mentioned above to support html/anchor tags in the opt-in label until we update the plugin to support that.

    Plugin Contributor Saint Systems

    (@saintsystems)

    Please see this new post for further information on GDPR how to mimic the MailChimp GDPR forms.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Make Opt-in checkbox required’ is closed to new replies.