• Resolved sandeld

    (@sandeld)


    Hello,
    I’m following the instructions on this page for syncing additional WooCommerce fields, and I can’t seem to get it to work.

    I’m trying to sync the Billing Phone number, which I assume is ‘billing_phone’ from the WooCommerce checkout page.

    Here is the exact code I’m using:

    add_filter( 'mc4wp_integration_woocommerce_data', function( $data ) { 
    	// Grab MailChimp field values from the current request
    	$data['PHONE'] = sanitize_text_field( $_POST['billing_phone'] ); 	
    	// Return the fields so the plugin knows to send them to MailChimp
    	return $data; 
    });

    Where ‘PHONE’ corresponds to the merge field inside MailChimp:

    I’ve also made sure to “refresh lists” from the mc4wp settings just in case. And yes, the WooCommerce integration is on and active.

    What else could I be missing?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Contributor Harish Chouhan

    (@hchouhan)

    Hello,

    That code looks correct.

    Can you please try the code at https://github.com/ibericode/mc4wp-snippets/blob/master/integrations/woocommerce/send-billing-fields.php instead and let us know if that works?

    Thread Starter sandeld

    (@sandeld)

    Still not working.

    Thread Starter sandeld

    (@sandeld)

    This error keeps showing up:

    [2019-07-17 14:45:55] INFO: Registration Form > Successfully subscribed sandeld+2@gm***.com
    [2019-07-17 14:45:58] ERROR: WooCommerce Checkout > Mailchimp API Error: Method Not Allowed. This list member cannot be removed. Please contact support.
    Request: DELETE https://us14.api.mailchimp.com/3.0/lists/d0118d89de/members/f38ed4731bddc7ba083d19a79623f275
    Response: 405 Method Not Allowed - {"type":"https://developer.mailchimp.com/documentation/mailchimp/guides/error-glossary/","title":"Method Not Allowed","status":405,"detail":"This list member cannot be removed. Please contact support.","instance":"7abcf3bd-2a73-4b68-bf75-9689845c54ee"}
    Plugin Contributor Harish Chouhan

    (@hchouhan)

    Hello,

    There is another issue related to “Double Opt-in” that is affecting a few users due to some change in MailChimp.com. The last error would be related to it. When testing, can you please test using a different email address?

    Thread Starter sandeld

    (@sandeld)

    I’ve tested with 4 different email addresses prior to posting that, and another new one after.

    Plugin Contributor Harish Chouhan

    (@hchouhan)

    Hello,

    I apologize for the delay in replying.

    Can you please update the plugin and test again? The error was due to some new rules in MailChimp. Also, I would suggest disabling “Double Opt-in” when testing.

    Plugin Contributor Harish Chouhan

    (@hchouhan)

    Hello,

    Can you please update us if this issue is resolved?

    Thread Starter sandeld

    (@sandeld)

    I’m not sure. I was helping a random person from a FB group, and he got impatient and ended up buying a different premium plugin that did this for him.

    Sorry!

    Plugin Contributor Harish Chouhan

    (@hchouhan)

    Thanks for the update.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘WooCommerce Additional Fields Not Working’ is closed to new replies.