Troubleshooting
PA API returns InvalidSignature or TooManyRequests
InvalidSignature usually means your API key or secret is wrong, or your server clock is more than 15 minutes off UTC. Verify keys under Settings -> Amazon Associates Programs, then SSH into your server and run date -u to compare against UTC. Use ntpd or chronyd to sync.
TooManyRequests means you exceeded 1 req/sec. OAmazon throttles automatically and queues retries via transients, but bursts (bulk import, sudden traffic spike) can hit the cap. The queue retries with exponential backoff.
Cloaked links 404
The rewrite rule for /go/<slug>/ is added on activation. If you've changed permalink structure or moved the site:
- Settings -> Permalinks -> Save Changes (re-flushes rewrites).
- Or run
wp rewrite flushfrom WP-CLI. - Confirm
OAM_Links::flush_rewrite_rules_on_activation()ran by checking the optionoam_rewrite_flushed.
If the slug is also wrong (custom link prefix), verify Settings -> Link Prefix matches what your shortcode/PHP expects.
Prices show stale or zero
Product data refreshes every 24 hours by default. If a price field is 0, the API may have returned Offers.Listings.Price as missing (out of stock items often have no current price). Check the raw response in oam_products.raw_api_data for the actual API output.
Force a refresh via Products tab -> Refresh button on the product row, or via WP-CLI:
wp oamazon products refresh B08N5WRWNWGeo routing always sends visitors to default locale
OAM_Geo::get_visitor_locale() requires a geo source. The priority order is: OAM_VISITOR_COUNTRY constant, Cloudflare CF-IPCountry header, session option, Accept-Language, default locale. If you're not behind Cloudflare and have no geo-IP plugin, all requests resolve to default locale.
Fix by:
- Installing a geo-IP plugin that sets the constant or option.
- Or, if behind Cloudflare, ensuring the
CF-IPCountryheader is preserved (some reverse proxies strip headers).
A/B test never picks a winner
Statistical significance requires both volume and a meaningful difference. With low traffic, neither variant reaches significance, so OAM_ABTest::status stays running indefinitely. Either:
- Wait for more traffic.
- Lower the significance threshold under Settings -> A/B Tests (default 95%).
- Manually resolve the test by clicking Force Winner on the test row.

