Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI command wp edd customers is incomplete and fails using the examples on the website #9732

Open
arraypress opened this issue May 22, 2024 · 0 comments
Labels
type-bug workflow-needs-replication workflow-pending-triage Items that need to be triaged and reviewed before they are worked on.

Comments

@arraypress
Copy link
Contributor

Bug Report

Expected behavior

For testing purposes I wanted to create 100 customers using the WordPress CLI, which according to the documentation should be done like this:

wp edd customers --create=100

You can see this here: https://easydigitaldownloads.com/docs/wp-cli-commands/

Actual behavior

The operation "fails" because code is physically missing to create random names and emails in the CLI command.

Something like this fixes it (similar to the orders):

$fname  = $this->get_fname();
$lname  = $this->get_lname();
$domain = $this->get_domain();
$tld    = $this->get_tld();

$email = $fname . '.' . $lname . '@' . $domain . '.' . $tld;

$args = array(
	'email'   => $email,
	'name'    => $fname . ' ' . $lname,
);

$customer_id = edd_add_customer( $args );

Steps to reproduce the behavior

  1. Goto CLI and type wp edd customers --create=100
  2. You will see it errors out because it hits the 'else'.
  3. No customers are created.

Information (if a specific version is affected):

PHP Version: 8.3

EDD Version (or branch): 3.2.12

WordPress Version: 6.5.3

@arraypress arraypress added type-bug workflow-needs-replication workflow-pending-triage Items that need to be triaged and reviewed before they are worked on. labels May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug workflow-needs-replication workflow-pending-triage Items that need to be triaged and reviewed before they are worked on.
Projects
None yet
Development

No branches or pull requests

1 participant