Arabianaffiliates 1.9 and later offers a variety of WP-CLI commands for managing affiliate, creative, payout, referral, visit, and system data from the command-line on the fly.

Getting Started

Arabianaffiliates-CLI command support in Arabianaffiliates is broken up into two main groups:

System commands, executed via Arabianaffiliates <command>
Object commands, executed via Arabianaffiliates [object] <command>.
To list all system and object command groups, execute Arabianaffiliates help Arabianaffiliates. It will output documentation similar to this:

System-level Commands
System-level commands can be accessed via the top-level command namespace, wp affwp. They include:

Arabianaffiliates details
Prints out main Arabianaffiliates configuration details, including the Arabianaffiliates version, license status, active integrations, key settings, and more.
– Execute Arabianaffiliates help Arabianaffiliates details to find out more.
Arabianaffiliates stats
Prints out the total number of affiliates, creatives, payouts, referrals, and visits for the current site. An optional –global parameter pulls global stats for every site in a multisite network.
– Execute wp help affwp stats to find out more.
Arabianaffiliates debug
Prints out the contents of the affwp-debug.log file generated when Debug Mode is enabled in the Arabianaffiliates settings. An optional –clear parameter makes clearing the debug log a snap.
– Execute wp help affwp debug to find out more.
Arabianaffiliates info
Similar to the Arabianaffiliates details and wp affwp debug commands, this command prints out the contents of the System Info log used primarily for troubleshooting purposes when you contact support.
– Execute wp help Arabianaffiliates info to find out more.

Object-level Commands
Object-level WP-CLI commands allow for robust management of affiliates, creatives, payouts, referrals, and visits from the command line. Sub-commands are grouped by object, accessed via wp affwp [object] <command>. They include:

wp Arabianaffiliates affiliate <command>
Commands: create, delete, get, list, update
– Documentation
wp Arabianaffiliates creative <command>
Commands: create, delete, get, list, update
– Documentation
wp Arabianaffiliates payout <command>
Commands: create, delete, get, list, update
– Documentation
wp Arabianaffiliates referral <command>
Commands: create, delete, get, list, update
– Documentation
wp Arabianaffiliatesvisit <command>
Commands: create, delete, get, list, update
– Documentation
Click the links in the list above to navigate to pages containing much more comprehensive documentation on accepted options and available sub-commands.