Can’t access MailChimp_WooCommerce_Order ID
-
Hi guys,
I’m using mailchimp_get_ecommerce_merge_tags filter for adding custom merge tags, but it seems that the MailChimp_WooCommerce_Order can’t be accessed because it’s protected.
function mailchimp_custom_order_merge_tags($merge_tags, $order) { /// add whatever you want to the merge tags $order_id = $order->ID; mailchimp_log('debug', "tracing order {$order_id}", array('order' => $order)); return $merge_tags; } add_filter('mailchimp_get_ecommerce_merge_tags', 'mailchimp_custom_order_merge_tags', 10, 2);
Log:
2020-08-19T09:33:57+00:00 NOTICE debug :: tracing order :: Array ( [order] => MailChimp_WooCommerce_Order Object ( [id:protected] => 6483 [landing_site:protected] => .....
Am I missing something? Is there any getter function to access those values? I couldn’t find any information on github or here.
Thanks so much and Cheers,
Lukas
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Can’t access MailChimp_WooCommerce_Order ID’ is closed to new replies.