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