After the following script is run

wp wc product create --name='b' --categories=32 --user=user

Output is printed:

Success: Created product 1370.

But no categories are shown in wp-admin/WooCommerce->Products page for the newly added product.

I have followed Find Product Category IDs to get category id.
Tried to use [32], [’32’] instead of 32. The result is the same. Category is not shown in wordpress admin.
How to fix it?

Read more here: Categories not shown in admin after adding woocommerce products via wp wc cli


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: