Phone Number Not syncing
-
This has answered before but I still continue to face the issue where for some reason the phone number is not getting exported to Mailchimp. As suggested before I have added the following code to the functions.php file but it still does not work:
function mailchimp_custom_order_merge_tags($merge_tags, $order) { // the phone number can be used from either the shipping address, or the billing address. //$shipping_phone_number = (string) $order->getShippingAddress()->getPhone(); $billing_phone_number = (string) $order->getBillingAddress()->getPhone(); // this is what I would do – only supply it if the phone number is there. if (!empty($billing_phone_number)) { $merge_tags[‘PHONE’] = $billing_phone_number; } // return the merge tags to be submitted. return $merge_tags; } add_filter(‘mailchimp_get_ecommerce_merge_tags’, ‘mailchimp_custom_order_merge_tags’, 10, 2); ?>One more question – if someone checks out without creating an account then will address and phone be picked?
Please help
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Phone Number Not syncing’ is closed to new replies.