This doc contains a list of all of the commands you can use in WP-CLI for EDD.
The following commands are available:
Each of these commands has optional parameters that are detailed below. You can see a list of the available commands at anytime by simply entering:
This will display a list of all registered commands:
The edd customers command will allow you to view and create customers from the command line.
$ wp edd customers email@example.com Customer User ID: Username: Display Name: Email: firstname.lastname@example.org Purchases: 0 Total Spent: 0.00 USD Total Downloads: 0 email@example.com Customer User ID: Username: Display Name: Email: firstname.lastname@example.org Purchases: 0 Total Spent: 0.00 USD Total Downloads: 0 email@example.com Customer User ID: Username: Display Name: Email: firstname.lastname@example.org Purchases: 0 Total Spent: 0.00 USD Total Downloads: 0 ..
You can get the information for a specific customer by passing in
$ wp edd customers --id=1 email@example.com Customer User ID: 2 Username: customer1 Display Name: Customer One Email: firstname.lastname@example.org Purchases: 5 Total Spent: 28.00 USD Total Downloads: 0
You can also pass in an email address with –email@example.com
$ wp edd customers --firstname.lastname@example.org email@example.com Customer User ID: 1 Username: admin Display Name: Admin User Email: firstname.lastname@example.org Purchases: 57 Total Spent: 388.46 USD Total Downloads: 20
Creating customers can be done one at a time, or in bulk.
Creating a Single Customer
With an automatically generated email address
wp edd customers --create=1
With a specific email address
wp edd customers --create=1 --email@example.com
wp edd customers --create=1 --firstname.lastname@example.org --name="John Doe"
wp edd customers --create=1 --email@example.com --name="John Doe" user_id=1
Creating Customers in Bulk
wp edd customers --create=1000
The wp edd details command will provide a list of details about your Easy Digital Downloads install, including the version number, a few important settings, your tax rate, and more. It looks like this:
wp edd discounts command provides a list of discount codes available in your store. It accepts an optional –id=# parameter to allow you to view the details of a specific discount code:
wp edd discount
The wp edd discounts command provides a list of discount codes available in your store. It accepts an optional –id=# parameter to allow you to view the details of a specific discount code:
wp edd discount
The wp edd sales command will output a list of your recent store sales. Each sale record will include the payment ID, the total, the customer email, the date, the tax, any fees, the payment gateway used, and a list of products included in the purchase:
wp edd sales
The wp edd stats command will show you sales and earnings stats for your store. Running it without any parameters will give you the stats for the current month:
It also accepts several different parameters that let you view the stats for specific dates and/or products:
- wp edd stats –date=this_month
- wp edd stats –start-date=01/02/2014 –end-date=02/23/2014
- wp edd stats –date=last_year
- wp edd stats –date=last_year –product=15
You can pass any date string to the
–date, —start-date and –end-date parameters, or you can pass one of the following pre-defined periods:
If you want to get the sales and earnings for a specific product, pass in
–produxt=# where # is the ID number of the product: