[lcw_contact_sync]
🔄 Shortcode: [lcw_contact_sync]
Description
The [lcw_contact_sync] shortcode is used to
sync contact data from GoHighLevel (GHL) into your WordPress site.
It updates or creates the corresponding user/contact record in WordPress with the latest data from GHL.
⚠️ Important Caution
Do not use this shortcode everywhere or in automated processes.
It performs a sync request to GoHighLevel, which may affect performance or API limits if overused.Use this shortcode only when you specifically need to refresh contact data —
for example, after updating a user’s details in GoHighLevel and needing those changes to appear immediately on WordPress.
🧩 Usage
Recommended (Background Sync):
[lcw_contact_sync]
By default, the contact is synced in the background, providing the best performance and user experience.
Sync Immediately on Page Load:
[lcw_contact_sync sync_in_background="false"]
Use this option only when you need the latest contact data and membership access to be updated before the current page is displayed.
⚙️ Attributes
| Attribute | Default | Description |
|---|---|---|
sync_in_background |
true |
When set to true (recommended), the contact sync runs in the background without delaying the page load.
When set to |
⚡ Built-in Sync Protection
To improve performance and reduce unnecessary API requests, the plugin automatically prevents repeated syncs.
A contact can only be synced once every 2 minutes.
If another sync is requested within that time, it will be skipped automatically.
✅ Best Practice
For the best balance of performance and accuracy, we recommend leaving
sync_in_background="true".
Only set it to false when you need the latest contact data, tags, memberships, or permissions to be available immediately on the current page.
✅ When to Use
- After updating a contact’s information in GoHighLevel.
- After changing a user’s tags, memberships, or custom fields in GoHighLevel.
- When troubleshooting contact data mismatches between GoHighLevel and WordPress.
- On member-only pages where you need to ensure the latest permissions are applied.
🚫 When Not to Use
- Do not place it in headers, footers, or templates that load on every page.
- Avoid using it inside loops or repeatedly on the same page.
- Do not use it in scheduled cron jobs unless absolutely necessary.
- Do not use it unless you specifically need to refresh the user’s contact data.
