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.