I am developing a motorbike parts ecommerce with Wordpress/Woocomerce.
I find a lot of problems because my bussiness requieres very deep tree category products (brand > model > engine > version > year), and there are many registers for that! (more than 62.000 rows, ID categories...)
So, I am using WP-CLI WC-CLI command line for deal with that.
I know how to create one product through command line:
wp wc product create --name="product name" --sku=001 --user=admin
I even know how to create many products in the same command line:
wp wc product create --name="product name" --sku=001 --user=admin | wp wc product create --name="product name 2" --sku=002 --user=admin | (and so on)
But, my question is:
May I create/update thousands of products with just one line in my terminal?
Something like this:
wp wc product create --name='[{"name"=product name 3},{"name"=product name 4},{"name"=product name 5}]' --sku=003 --user=admin
I saw, that kind of json format works for assigning to the same product many categories:
--categories='[{"id"=21},{"id"=22}]
If that is not possible, is it possible to run some terminal/command line script to throw this single lines as loop with some timeout?
In advance, thanks a lot!