Skip to main content
Easy Digital Downloads Documentation
Documentation, Reference Materials, and Tutorials for Easy Digital Downloads

EDD WP-CLI Commands Overview

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:

wp edd

This will display a list of all registered commands:

Screenshot from 2014-09-11 10:19:11

Customers

The edd customers command will allow you to view and create customers from the command line.

Viewing Customers

$ wp edd customers
customer-54e23021ef7b6@test.com
Customer User ID:
Username:
Display Name:
Email: customer-54e23021ef7b6@test.com


Purchases: 0
Total Spent: 0.00 USD
Total Downloads: 0


customer-54e23021ef164@test.com
Customer User ID:
Username:
Display Name:
Email: customer-54e23021ef164@test.com


Purchases: 0
Total Spent: 0.00 USD
Total Downloads: 0


customer-54e23021eeb6d@test.com
Customer User ID:
Username:
Display Name:
Email: customer-54e23021eeb6d@test.com


Purchases: 0
Total Spent: 0.00 USD
Total Downloads: 0
..

You can get the information for a specific customer by passing in 
–id=#:

$ wp edd customers --id=1
chris@chriskdesigns.com
Customer User ID: 2
Username: customer1
Display Name: Customer One
Email: chris@chriskdesigns.com


Purchases: 5
Total Spent: 28.00 USD
Total Downloads: 0

You can also pass in an email address with –email=john@test.com

$ wp edd customers --email=admin@local.dev
admin@local.dev
Customer User ID: 1
Username: admin
Display Name: Admin User
Email: admin@local.dev


Purchases: 57
Total Spent: 388.46 USD
Total Downloads: 20

Creating Customers

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=john@test.com
With a specific email and name
wp edd customers --create=1 --email=john@test.com --name="John Doe"
Adding in a user ID
wp edd customers --create=1 --email=john@test.com --name="John Doe" user_id=1

Creating Customers in Bulk

wp edd customers --create=1000

Details

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:

Screenshot from 2014-09-11 10:21:41

Discounts

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

Products

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

Sales

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
Screenshot from 2014-09-11 10:38:47

Stats

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:

  • today
  • yesterday
  • this_week
  • last_week
  • this_month
  • last_month
  • this_quarter
  • last_quarter
  • this_year
  • last_year

If you want to get the sales and earnings for a specific product, pass in
–produxt=# where is the ID number of the product:

[class^="wpforms-"]
[class^="wpforms-"]