wc-smooth-generator
wc-smooth-generator copied to clipboard
Companies without personal details and only allowed countries
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 https://github.com/woocommerce/wc-smooth-generator/issues/108 and https://github.com/woocommerce/wc-smooth-generator/issues/66
How to test the changes in this Pull Request:
- use
wp wc generate customers 10
to generate 10 customers - Check the page
/wp-admin/edit.php?post_type=shop_order orders
for orders
feature #108
In 3/4 cases there is a business involved with an order. It can be shipping, billing, or both. If there is a business involved, there will be a 1/2 chance that the address will be assigned to only the business. The other 1/2 would be that the address will be assigned to a business with a person. That means that the fields firstname and lastname will be filled out.
with billing / shipping addresses wich do have a business (the field company
with a value) but do not have personal details (firstname
and lastname
empty)
feature #66
There is the woocommerce option woocommerce_allowed_countries
, which can be set in the page /wp-admin/admin.php?page=wc-settings
to three different options:
- all countries
- just a few specified ones
- all others than the ones specified
every option has its own logic added to the pull request.
Other information:
- [x] Have you added an explanation of what your changes do and why you'd like us to include them?
- [ ] Have you written new tests for your changes, as applicable?
- [ ] Have you successfully run tests with your changes locally?
Changelog entry
Now, it is also possible to generate customers with businesses for orders, which are not assigned to a person. They do not have the fields first name and last name in shipping and billing.
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.