Hi @chrishardie, it looks like you’ve been in contact with our developer group over at Github. Thanks again for the PR! https://github.com/mailchimp/mc-woocommerce/pull/844.
Thanks for the response @khungate – this was actually meant to be a separate inquiry from the PR/issue mentioned, so if you have any guidance on excluding products that would be great. If not, I can work on a PR to see if it would be useful to other users of the plugin.
@chrishardie we’ve talked a few times about this on our end and the only thing I can think of that makes sense is a filter inside our mailchimp_handle_or_queue function – in the bootstrap.php file.
if ($job instanceof \MailChimp_WooCommerce_Single_Order &&
apply_filters('mailchimp_should_push_order', $job) === false) {
return null;
} else if ($job instanceof \MailChimp_WooCommerce_Single_Product &&
apply_filters('mailchimp_should_push_product', $job) === false) {
return null;
}
Then you would just register the filter and return false based on this object and the product ID etc.
We would need to put this in our next release because we’ve got 2.7 going through QA at the moment… but if you could try that out on your end first and let us know if that’s something that makes sense, we can certainly add this into the next release.
Thanks again!
Thank you. I’ve submitted a PR here to keep the conversation going:
https://github.com/mailchimp/mc-woocommerce/pull/845
I’ll close this support request for now.