You will need JQ to format the output.
Created
May 8, 2025 01:03
-
-
Save luiseduardobraschi/f4a0413dd01ca2d94f8d9bbb6fc06b27 to your computer and use it in GitHub Desktop.
List WooCommerce categories in "key value" format from Rest API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl https://yoursite.com/wp-json/wc/v3/products/categories \ | |
-u ck_test:cs_test | jq '.[] | .id .name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment