• Resolved davidknoebl

    (@davidknoebl)


    If a contact/email address already exists in HubSpot, the plugin fails to sync the WooCommerce customer profile and the HubSpot profile.

    The problem is that the HubSpot API responds with an error that the plugin apparently cannot handle correctly, resulting in a missing entry for the user metadata hubwoo_user_vid.

    This means that hubwoo_user_vid is not available for upcoming synchronization tasks – which in our case resulted in failed deal-to-contact associations.

    One can fix this error by providing logic that catches the HubSpot API error response in the case of pre-existing contact profiles.

    In the source code file class-hubwooobjectproperties.php in lines 95 ff, the plugin tries to catch multiple error cases, from which none works in the mentioned case. This is because the create_object_record() method has to work with an instance of WP_Error, and as a result returns an array where $response['status_code'] == 'error', instead of one of the HTTP status codes the plugin is looking for. The if statement, where the plugin looks for an HTTP 409 Conflict status code, is never fired.

    Instead, one needs to check if the returned response indicates that the given email address already exists (for example, by searching for Existing ID: in the response coming from HubSpot) and then save the returned ID as hubwoo_user_vid user meta.

    We have fixed this bug in a custom branch of the plugin for ourselves, but would greatly appreciate a quick fix from the plugin authors.

    Thanks!

Viewing 1 replies (of 1 total)
  • Plugin Author MakeWebBetter

    (@makewebbetter)

    Hi David,

    Thank you for reaching out to us.

    We would like to tell you that, this seems to be a site-specific issue as we checked this internally our testing site and everything is working fine.

    Thank you for your suggestions, we’ll look into it if it occurs on any other of our clients, and we’ll fix it globally.

    Regards,

Viewing 1 replies (of 1 total)
  • The topic ‘Error while syncing existing contacts/customers’ is closed to new replies.