Billing addresses are not correctly transferred to Mailchimp
-
Hello,
I have an issue with transferring customer billing addresses to their subscriber profile in Mailchimp.
As Mailchimp is very picky about data that enters the address type field I force customers to enter a Region / State during checkout. Otherwise, their address will not be transferred to their data in Mailchimp at all.
The problem I’m facing now is the following:
Regardless of what country I’m entering during a test purchase in the address field of the new customer it says GERMANY in the subscriber data in Mailchimp.
In WooCommerce however the billing_country of the customer is correct.
The code in my functions.php looks like this now:`
//WooCommerce Checkout Fields
add_filter( ‘woocommerce_states’, ‘xa_filter_woocommerce_states’, 10, 1 );function xa_filter_woocommerce_get_country_locale( $locale ) {
$locale[‘state’][‘required’] = true;
return $locale;
};
add_filter( ‘woocommerce_get_country_locale’, ‘xa_filter_woocommerce_get_country_locale’, 10, 1 );add_filter(‘woocommerce_checkout_fields’, ‘custom_override_checkout_fields’);
function custom_override_checkout_fields($fields)
{
$fields[‘billing’][‘billing_country’][‘label’] = ‘Land’;
$fields[‘billing’][‘billing_state’][‘label’] = ‘Bundesland’;
return $fields;
}The page I need help with: [log in to see the link]
- The topic ‘Billing addresses are not correctly transferred to Mailchimp’ is closed to new replies.