wc-smooth-generator
wc-smooth-generator copied to clipboard
Shipping billing addresses feature
All Submissions:
- [x] Have you followed the Contributing guidelines?
- [x] Does your code follow the WordPress' coding standards?
- [x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
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.
No problem, glad to see it worked @Luc45
@samueljseay can u check and merge this one also?
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?
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 @jonathansadowski should now be fine - can you check?
Hi @michi-dev,
Sorry for the delay in getting back to this. Looks great, thanks for your contribution!