Installation
Requirements
- WordPress 6.5+
- PHP 8.0+
- Orravo Core (hard dependency)
- Amazon Associates account in at least one region
- Amazon Product Advertising API 5.0 (PA API) credentials
Upload and activate
- Upload the
oamazon/folder to/wp-content/plugins/. - Activate via Plugins -> Installed Plugins.
- If Orravo Core is missing, an admin notice blocks activation.
- Find Oamazon under the Orravo Core admin menu.
What activation creates
oam_activate() runs oam_install_tables() (via dbDelta), flushes rewrite rules for cloaked link redirects, schedules cron jobs via OAM_Cron::schedule_all(), and stores the current version in oam_version.
Tables created:
| Table | Purpose |
|---|---|
oam_products | Cached product data from PA API (ASIN + locale unique) |
oam_links | Managed cloaked affiliate links (slug, target ASIN, UTM, geo routing) |
oam_clicks | Click events with hashed IP/UA, country, device, A/B variant |
oam_displays | Saved display configurations (type + style + ASINs + settings) |
oam_abtests | A/B tests between two displays |
oam_programs | Amazon Associates programs per region (locale + tag + API credentials) |
oam_keywords | Keyword -> ASIN auto-link rules |
oam_disclosures | FTC disclosure templates per context |
Activation seeds one default disclosure: "This post contains affiliate links. As an Amazon Associate, we earn from qualifying purchases at no extra cost to you." (context: post, position: before).
Plugin constants
phpOAM_VERSION // '1.1.1'
OAM_DIR // Plugin directory path
OAM_URL // Plugin URL
OAM_FILE // Plugin main fileAuto-migration
On plugins_loaded, the plugin checks oam_version against OAM_VERSION and re-runs oam_install_tables() if the version differs. It also detects missing columns (e.g. redirect_status on oam_links) and runs dbDelta to add them without bumping the version.

