• Resolved Stefan M.

    (@stefan-m-1)


    This is the offfical code:

    protected function getOptinStatus()
    {
    $mailchimp_newsletter = new MailChimp_Newsletter();
    // if the user has chosen to hide the checkbox, don't do anything.
    if ( ( $default_setting = $mailchimp_newsletter->getOption('mailchimp_checkbox_defaults', 'check') ) === 'hide') {
    return 'hide';
    }

    // if the user chose 'check' or nothing at all, we default to true.
    $default_checked = $default_setting === 'check';
    $status = $default_checked;

    // if the user is logged in, we will pull the 'is_subscribed' property out of the meta for the value.
    // otherwise we use the default settings.
    if (is_user_logged_in()) {
    $status = get_user_meta(get_current_user_id(), 'mailchimp_woocommerce_is_subscribed', true);
    /// if the user is logged in - and is already subscribed - just ignore this checkbox.
    if ($status === '' || $status === null) {
    $status = $default_checked;
    }
    }

    return $status === true || $status === '1' ? 'check' : 'uncheck';
    }

    I mean, really?

    $default_checked = $default_setting === ‘check’;
    $status = $default_checked;

    why not adding an apply_fitlers there that we can change that to out-out (unckeck) as default?

    Really frustrating that we cannot obide the law as for the plugin has not the option to do so, except breakt updates and modify the code.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Stefan M.

    (@stefan-m-1)

    I did manually edit the

    mailchimp-qoocommerce option in the database and included: :”mailchimp_checkbox_defaults”;s:7:”uncheck”;

    Why is there no settings page, where these option can be modified?

    Plugin Author ryanhungate

    (@ryanhungate)

    @stefan-m-1 are you asking how to change the newsletter setting to be “unchecked” on the checkout page? If so that’s very easy to do in the Mailchimp plugin admin under the “Store” tab where you can actually change this setting. Have you tried that yet?

    Plugin Support khungate

    (@khungate)

    Hi there, we’re going to close out this ticket for now since it’s been a few weeks since we’ve been in touch.

    Please let us know if you still need any help and we’ll be glad to reopen and troubleshoot further. Please note, that the best way to reach us is over at the GitHub plugin page: https://github.com/mailchimp/mc-woocommerce/. From there, you can receive direct responses from the development team, log new issues, download the latest version, and track existing support tickets.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.