Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter tdobson

    (@tdobson)

    Golly. This is a new record. I’ve fixed it.

    I spent FOUR MONTHS on this problem, registered for this forum specially…

    ..and solved it myself within 5 mins of registering.

    The syntax is:

    --meta_data='[{"key": "test_meta1","value": "test_meta_value"}]'

    eg

    sudo wp wc product  create --name="test4" --regular_price=10 
    --meta_data='[{"key": "test_meta1","value": "test_meta_value"}]' --user=1

    I better go and close my own stackoverflow question.

    Hi @tdobson

    It is great that you resolved it already! Thanks for sharing your solution with the WooCommerce community.

    I’d like to keep you informed that in future if needed you can get better coding-related help at the following development related channels, as support for custom coding is beyond the scope of support we are able to provide in this forum. This particular forum is for questions that are related to the WooCommerce core features.

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Using wp wc CLI to add meta_data’ is closed to new replies.