Thread Starter
Dan
(@danrwalker)
I made a quick update to the plugin file mailchimp-for-woocommerce/admin/class-mailchimp-woocommerce-admin.php on line 729, I added detection for WP_Error so I could see what message was coming back from the remote call.
$response = wp_remote_post( 'https://woocommerce.mailchimpapp.com/api/finish', $pload);
if (!is_wp_error($response) && $response['response']['code'] == 200 ){
delete_site_transient('mailchimp-woocommerce-oauth-secret');
// save api_key? If yes, we can skip api key validation for validatePostApiKey();
wp_send_json_success($response);
}
else wp_send_json_error( $response );
I get back the following response now in the AJAX, not sure if this is helpful towards diagnosing the issue?
{"success":false,"data":[{"code":"http_request_failed","message":"Too many redirects"}]}