Abuja Digital Studio · Est. 2018
Start a Project
DocsOAmazonInstallation
Getting Started

Installation

OAmazonorravo.com/docs/oamazon/installation

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

  1. Upload the oamazon/ folder to /wp-content/plugins/.
  2. Activate via Plugins -> Installed Plugins.
  3. If Orravo Core is missing, an admin notice blocks activation.
  4. 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:

TablePurpose
oam_productsCached product data from PA API (ASIN + locale unique)
oam_linksManaged cloaked affiliate links (slug, target ASIN, UTM, geo routing)
oam_clicksClick events with hashed IP/UA, country, device, A/B variant
oam_displaysSaved display configurations (type + style + ASINs + settings)
oam_abtestsA/B tests between two displays
oam_programsAmazon Associates programs per region (locale + tag + API credentials)
oam_keywordsKeyword -> ASIN auto-link rules
oam_disclosuresFTC 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 file

Auto-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.

Installation · OAmazon Docs | Orravo