Doesn’t seem to work with WooCommerce’s PayPal Express Checkout plugin
-
The integration doesn’t seem to work properly with the PayPal Express Checkout plugin from WooCommerce (https://www.ads-software.com/plugins/woocommerce-gateway-paypal-express-checkout/).
Subscribers do get added to the MailChimp list correctly, but only their email address is being passed to MailChimp, not first name, last name, etc.
I’m intentionally setting the ‘SIGNUP’ to the default ‘checkout’ so that I can see where the subscribers are being subscribed from. This IS WORKING, and being sent to MailChimp.
I think the Express Checkout plugin changes the way the customer information is handled in WooCommerce, since it’s pulling it from PayPal once the customer gets to the ‘Confirm Order’ page.
As explained here; https://mc4wp.com/kb/send-more-woocommerce-fields-to-list/), I’ve tried the following code to try and pass more details to MailChimp, but it still doesn’t seem to be working.
add_filter( 'mc4wp_integration_woocommerce_data', function( $data ) { // Grab MailChimp field values from the current request $data['FNAME'] = sanitize_text_field( $_POST['billing_first_name'] ); $data['LNAME'] = sanitize_text_field( $_POST['billing_last_name'] ); $data['SIGNUP'] = sanitize_text_field( 'checkout' ); $data['CITY'] = sanitize_text_field( $_POST['shipping_city'] ); $data['STATE'] = sanitize_text_field( $_POST['shipping_state'] ); $data['COUNTRY'] = sanitize_text_field( $_POST['shipping_country'] ); // Return the fields so the plugin knows to send them to MailChimp return $data; });
The plugin seems to pull the PayPal information as the shipping address in WooCommerce, with the billing address left blank apart from the name field. But I’ve also tried using the ‘billing_’ prefix instead of ‘shipping_’ to no avail.
- The topic ‘Doesn’t seem to work with WooCommerce’s PayPal Express Checkout plugin’ is closed to new replies.