Common Errors & Solutions
“Mapping limit reached” (Free version)
The free version of AffLoc allows up to 20 link mappings. Each slug + country combination counts as one mapping.
Solution: Either delete unused mappings or upgrade to Pro for unlimited mappings.
Shortcode displays as text
If Buy Now appears as plain text on your page:
- Make sure the AffLoc plugin is activated.
- Check that the shortcode syntax is correct (no extra spaces or typos).
- If you’re using a custom shortcode name (Pro), verify it matches what you set in the settings.
“Not Available in Your Country” still showing
This means the affiliate link itself is returning a geo-blocked page. AffLoc swaps the URL, but the destination site may still have its own restrictions.
Solution: Ensure your mapped URLs are valid affiliate links for each specific country’s marketplace.
JavaScript console error: “affLocVars is not defined”
This means the frontend script loaded but the localization data didn’t. Possible causes:
- A plugin or theme is interfering with
wp_localize_script(). - The script is loading before WordPress has a chance to localize it.
Solution: Deactivate plugins one by one to find the conflict.
REST API returns 403/404
Some security plugins block REST API access. Check:
- Wordfence — Whitelist the
/wp-json/aff-loc/endpoint. - iThemes Security — Ensure REST API is not disabled.
- Go to Settings → Permalinks and save to flush rewrite rules.