Seems to work again. Maybe a server-side bugfix, because there wasn’t any update.
@stefk
It should work with:
function mailchimp_custom_order_merge_tags($merge_tags, $order) {
$birthday = get_post_meta( $order->getId(), 'date_of_birth', true );
/// add whatever you want to the merge tags
$merge_tags['MMERGE3'] = $birthday;
return $merge_tags;
}
add_filter('mailchimp_get_ecommerce_merge_tags', 'mailchimp_custom_order_merge_tags', 10, 2);
Ok, sorry guys .. after looking at the MailChimp_WooCommerce_Order class it’s obvious that we’ve to use the getId() getter function. Thanks anyways 🙂