Stars: 276
Forks: 42
Pull Requests: 66
Issues: 48
Watchers: 98
Last Updated: 2023-06-27 17:06:31
Smooth product, customer and order generation for WooCommerce
License:
Languages: PHP, JavaScript, Shell
A smooth products, customer and order generator using WP-CLI. Future versions will include scheduled auto generation functionality.
WooCommerce Smooth Generator requires Composer and WP-CLI to function.
composer install
and wait for the installation to completewp plugin activate wc-smooth-generator
to activate the pluginwp wc generate
command.Generate products based on the number of products parameter.
wp wc generate products <nr of products>
Generate products of the specified type. simple
or variable
.
wp wc generate products <nr of products> --type=simple
Generate orders from existing products based on the number of orders parameter, customers will also be generated to mimic guest checkout.
Generate orders for the current date
wp wc generate orders <nr of orders>
Generate orders with random dates between --date-start
and the current date.
wp wc generate orders <nr of orders> --date-start=2018-04-01
Generate orders with random dates between --date-start
and --date-end
.
wp wc generate orders <nr of orders> --date-start=2018-04-01 --date-end=2018-04-24
Generate orders with a specific status.
wp wc generate orders <nr of orders> --status=completed
Generate coupons based on the number of coupons parameter.
wp wc generate coupons <nr of coupons>
Generate coupons with a minimum discount amount.
wp wc generate coupons <nr of coupons> --min=5
Generate coupons with a maximum discount amount.
wp wc generate coupons <nr of coupons> --max=50
Generate customers based on the number of customers parameter.
wp wc generate customers <nr of customers>
Generate terms in the Product Categories taxonomy based on the number of terms parameter.
wp wc generate terms product_cat <nr of terms>
Generate hierarchical product categories with a maximum number of sub-levels.
wp wc generate terms product_cat <nr of terms> --max-depth=5
Generate product categories that are all child terms of an existing product category term.
wp wc generate terms product_cat <nr of terms> --parent=123
Generate terms in the Product Tags taxonomy based on the number of terms parameter.
wp wc generate terms product_tag <nr of terms>
Requirements
nvm use
to ensure your current Node version is compatible.npm run setup
to get started. This will install a pre-commit Git hook that will lint changes to PHP files before they are committed. It uses the same phpcs ruleset that's used by WooCommerce Core.