Restoring GatherUp API connection on a WordPress site after authentication and cache conflicts

Issue summary:
A GatherUp integration stopped populating customer reviews and star ratings on a WordPress site. The issue stemmed from invalid API credentials and a cron job overwriting GatherUp IDs stored in post meta. After correcting the API keys, restoring post metadata, and disabling a conflicting cache optimization setting, the connection was successfully re-established and reviews displayed correctly on all location pages.

Issue background

The GatherUp plugin was used to sync and display business reviews across multiple location pages on a large WordPress website. However, the reviews stopped appearing on the front end, and no new data was syncing from GatherUp’s API.

Initial checks showed that the existing client ID and API key were no longer valid, and the GatherUp ID fields on the location posts were blank. This meant that the connection between the GatherUp API and the WordPress site had been broken, resulting in no reviews being fetched or rendered.

Diagnosis

The Freshy development team began by reviewing the GatherUp plugin settings at:
/wp-admin/options-general.php?page=gatherup

They noticed two primary issues:

  1. API credential mismatch: The existing client ID and API key were outdated.
  2. Post meta overwriting: The cron job in the custom plugin wds-patient-first-api-ingest was updating posts and erasing the stored GatherUp IDs, causing all review data to disappear.

Additionally, GatherUp’s API authentication had changed slightly — while the interface mentioned a “Bearer token,” the actual sync only required the Client ID and API Secret.

To complicate matters further, after the API keys were replaced, the star ratings on the front end still weren’t appearing. This pointed to a front-end rendering issue unrelated to the API itself.

Resolution steps

  1. Updated GatherUp credentials:
    • Replaced the old Client ID and API Key with the new values provided by the client.
    • Verified that the Bearer Token was not necessary for the connection.
    • Tested the connection manually to confirm the API returned data.
  2. Fixed metadata loss:
    • Restored GatherUp IDs for all location posts using a backup of the WordPress database.
    • Reviewed the cron job file located at plugins/wds-patient-first-api-ingest/inc/cron-jobs/f-gatherup-data.php and confirmed that the script was overwriting post meta when a business record was missing from the API response.
  3. Resolved front-end rendering issue:
    • Discovered that the WP Rocket “Remove Unused CSS” optimization was preventing JavaScript from inserting review stars into the page.
    • Disabled this specific optimization setting.
  4. Re-tested GatherUp sync:
    • Manually triggered the cron job to verify reviews were being fetched and displayed.
    • Confirmed the stars and review sections were rendering properly on all location pages.

Final outcome

The GatherUp integration was successfully restored, reviews reappeared on all pages, and the sync now runs reliably via the site’s scheduled cron. The API credentials were verified as active, and the root cause — post meta overwriting and cache interference — was fully addressed.

The site now correctly displays all reviews with up-to-date star ratings and no longer requires manual re-entry or re-fetching of GatherUp IDs.

Lessons learned

  • Always confirm API key validity and scope after any change in authentication.
  • Avoid hardcoding credentials in cron job scripts — store them in plugin settings for easier management.
  • Document the cron job behavior to prevent accidental overwrites of critical post meta fields.
  • Cache optimization plugins like WP Rocket can interfere with dynamic JavaScript rendering; test key functionality after enabling such settings.

Is your WordPress site not syncing properly with a third-party API like GatherUp? Contact the Freshy team for expert WordPress integration troubleshooting and maintenance.