Good day,
I'm using the wp-cli
for adding products to Wordpress, for example i use this one:
wp --allow-root wc product create --user=1 --name="Restricted" --regular_price=1
I do have some attributes called test_1 (checkbox for yes) and test_2 is a multiselect. But is there a way to fill that attributes?
I did try this:
wp wc product create --user=1 --name="Restricted" --regular_price=1 --test_1=yes --test_2=testvalue,testvalue2
But that did result in an error:
Error: Parameter errors:
unknown --test_1 parameter
unknown --test_2 parameter
And did this one, but the values were still empty:
wp wc product create --user=1 --name="Restricted" --regular_price=1 --attributes='[{"test_1": "yes", "test_2": ["testvalue","testvalue2"]}]'
And this one:
wp wc product create --user=1 --name="Restricted" --regular_price=1 --attributes='[{"test_1": 1, "test_2": ["testvalue","testvalue2"]]'