wc-smooth-generator icon indicating copy to clipboard operation
wc-smooth-generator copied to clipboard

Shipping billing addresses feature

Open michi-dev opened this issue 2 years ago • 2 comments

All Submissions:

Changes proposed in this Pull Request:

Closes #70.

I have added more functionality than described in the issue #70. This needs a bit further explanation. I have divorced any shipping / billing address in three parts:

  • person (firstname, lastname)
  • address (address1,address2, city, state, postcode, country)
  • company (company_name)

Every customer, who gets generated, has those three parts. Every part has a random generation. I added the feature that at the customer generation in Customer.php: possibility A: billing = shipping (was done before) possibility B: 1/2 billing != shipping (added with this pull request)

therefore, the shipping address can have different details for

  • personal information (other person / same person)
  • location information (other location / same location)
  • company name (B2B (same company), B2B (different companies), B2C, C2B, C2C)

every part has its own random generation. with all three parts coming together its a unique order with in total (225) 40 combinations and therefore test cases.

How to test the changes in this Pull Request:

1.use wp wc generate customers 50 to directly test the customer generation 2.use wp wc generate orders 50 to see if the customers were correctly saved to the orders

Other information:

  • [x] Have you added an explanation of what your changes do and why you'd like us to include them?
  • [x] Have you written new tests for your changes, as applicable?
  • [x] Have you successfully run tests with your changes locally?

Changelog entry

Enter a summary of all changes on this Pull Request. This will appear in the changelog if accepted.

FOR PR REVIEWER ONLY:

  • [ ] I have reviewed that everything is sanitized/escaped appropriately for any SQL or XSS injection possibilities. I made sure Linting is not ignored or disabled.

michi-dev avatar Jan 31 '22 12:01 michi-dev

No problem, glad to see it worked @Luc45

michi-dev avatar Jul 04 '22 05:07 michi-dev

@samueljseay can u check and merge this one also?

masteradhoc avatar Sep 14 '22 14:09 masteradhoc

Hi @michi-dev,

Apologies not getting to this sooner. It looks like there are some conflicts now. Would you mind resolving those so that we can give this a re-review?

jonathansadowski avatar Sep 23 '22 16:09 jonathansadowski

It looks like there are still some conflicts here @michi-dev just bumping this in case you missed it. Sorry again for the delayed response on my part.

samueljseay avatar Sep 27 '22 21:09 samueljseay

@samueljseay @jonathansadowski should now be fine - can you check?

michi-dev avatar Sep 29 '22 07:09 michi-dev

Hi @michi-dev,

Sorry for the delay in getting back to this. Looks great, thanks for your contribution!

jonathansadowski avatar Jan 04 '23 20:01 jonathansadowski