Skip to content

Instantly share code, notes, and snippets.

@89gsc
Created September 1, 2020 16:13
Show Gist options
  • Save 89gsc/381c5b84697a24c0c9bb51466efb6bc2 to your computer and use it in GitHub Desktop.
Save 89gsc/381c5b84697a24c0c9bb51466efb6bc2 to your computer and use it in GitHub Desktop.
This will set the hook for woocommerce for mailchimp plugin to output on a different hook than the default.
// Replace YOUR_NEW_HOOK_NAME with the correct hook you want to output at, this should be within the form on the checkout still...
// I just needed to move mine from the addresss to somewhere else on the checkout.
$mailchimp_options = get_option('mailchimp-woocommerce');
if($mailchimp_options && isset($mailchimp_options['mailchimp_checkbox_action'])) {
$mailchimp_options['mailchimp_checkbox_action'] = 'YOUR_NEW_HOOK_NAME';
update_option('mailchimp-woocommerce', $mailchimp_options);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment