Debugging the abandoned cart feature

The abandoned cart feature should capture the email of an abandoned cart as soon as it’s filled in the email field on the checkout page, even if the form is not submitted.

To test if the abandoned cart feature works we recommend to first configure the plugin to enable debug logging by going to MailChimp for WP > Other and selecting the “Log everything” option.

Now you should log out of your WordPress admin area or use an incognito window so that you are now longer logged in. Add a product to your cart and proceed to the checkout page.

Use the Network tab in your browser’s developer tools to confirm whether an AJAX request is fired to admin-ajax.php once you enter a valid email address in the checkout form.

You should also see a log entry on the Mailchimp for WP > Other page indicating an abandoned cart was sent to Mailchimp.

If the debug log shows that abandoned carts are being sent to Mailchimp but automations are still not sending, it could be that the automation was setup for another store connection. You can either edit the abandoned cart campaign and see if there is a setting to change to a different store connection (this setting isn’t always shown) or you can delete your automation and create a new one for the correct store connection.

If there is no entry about abandoned carts being sent to Mailchimp on the Mailchimp for WP > Other page (while it was set to “Log everything” during the test) there may be another problem. If you are using a custom checkout page it’s possible that that checkout page is not calling the proper hooks or in some cases is working completely outside of your WordPress.

It’s also possible that the AJAX request is blocked by a security plugin or isn’t triggering due to a Javascript error on the page.

Abandoned cart not working with variable products.

Abandoned carts are registered in the Mailchimp API as a list of product IDs. Therefore, for MC4WP to recover the cart from the Mailchimp API when someone clicks the button in the Abandoned cart email, every line on the cart needs to have a valid product ID.

When you are using Product Attributes in Woocommerce, such as for example attributes for product size or color, it is important to generte so called “product variants” for each possible combination of attributes. That way WooCommerce creates the needed Product IDs for each possible variant.

TO generate the product variants, go to Products > All products, and edit your variable product. Under Product Data, find the Attributes section and ensure that the attributes have checked the “Used for variations” box. Under Product Data, find the Variations section and select Create variations from all attributes; this will create IDs for every possible variant.

If you rather not generate variants for all possible attribute combinations, it will not be possible to re-generate the carts with those attributes selected, and your cusotmer may return to an empty cart when clicking the button in the abadnoned cart email.