Closed inventivewebdesign closed 8 months ago
Hi @inventivewebdesign, thanks for your patience. At this time phone numbers do not sync to Mailchimp as a merge tag. As a workaround, you might want to explore the use of custom merge tags, as documented in the Mailchimp for WooCommerce Custom Merge Tags guide. This approach allows for additional user data fields, like phone numbers, to be synced.
Would this approach align with your situation?
I know that they don't sync. I did see some posts about Custom Merge tags I have researched it further and tried this code:
/**
* This will send additional WooCommerce checkout fields to MailChimp.
*
* @return array
*/
add_filter( 'mc4wp_integration_woocommerce_data', function( $data, $order_id ) {
$order = wc_get_order( $order_id );
// this sends the billing_phone field from WooCommerce to a Mailchimp field called "PHONE".
// I recommend using a text field, so that any format of phone number will pass validation in Mailchimp.
$data[ 'PHONE' ] = $order->get_billing_phone();
return $data;
}, 10, 2);
I seems like it should pull the billing phone from WooCommerce and drop in into Mailchimp. I created a text field and Merge tag in MailChimp of |PHONE| but nothing comes into the system. Not sure what is causing this to not function. Any ideas on this code?
@inventivewebdesign this hook you're referring to is from a different plugin :) This is the "Mailchimp for WooCommerce" plugin and the one you're referring to is the Mailchimp for Wordpress plugin. Are we getting any wires crossed on this one?
We have a wiki for custom merge tags for the user here.
We have a wiki for the custom merge tags for when an order is updated here.
Description: I am using the MailChimp for WooCommerce plugin (https://wordpress.org/plugins/mailchimp-for-woocommerce/).
We have a site selling event tickets using The Events Calendar integrated with WooCommerce.
If you attempt to purchase a ticket here: https://adamsplacelv.org/adams-place-event/webinar-working-with-grieving-children-facilitating-expressive-arts-activities/ it will take you to the WooCommerce Cart (https://adamsplacelv.org/cart/) and/or Checkout (https://adamsplacelv.org/checkout/) pages. These use the standard WC install.
Problem: When someone checks out (purchasing a ticket in WooCommerce) we are not receiving all of thier information in MailChimp.
What we get:
What we don't get (but would like to get):
Here is a screencast to express what I am saying: https://watch.screencastify.com/v/1pG1PF8Xb62HV6eWCpEU
All I want to know right now is why the standard WooCommerce Checkout fields like first name, last name and phone number do not get added to the correct place in the MailChimp contact.
Just as a note, I didn’t actually make a purchase in the video above but am referring to the previous purchase I made . I have double checked this with a recent purchase to confer that other users are also not getting all of their information added to Mailchimp.
Once again, we are using your plugin to do this: https://wordpress.org/plugins/mailchimp-for-woocommerce/ Some of the things it says on this plugin page that are important:
Operating environment (please complete the following information):
These were the versions when I ran the tests and for the most recent purchases. I have updated to the most recent versions now.