diff --git a/features/term.feature b/features/term.feature index c7378de7..574d1121 100644 --- a/features/term.feature +++ b/features/term.feature @@ -280,3 +280,21 @@ Feature: Manage WordPress terms """ Success: Term updated. """ + + Scenario: Term list includes term_group as optional field + When I run `wp term create category 'Group Test' --slug=group-test --description='Test term_group field'` + Then STDOUT should not be empty + + When I run `wp term list category --format=csv --fields=name,term_group` + Then STDOUT should contain: + """ + term_group + """ + + When I run `wp term list category --format=json --fields=term_id,name,term_group` + Then STDOUT should be JSON containing: + """ + [{ + "term_group":0 + }] + """ diff --git a/src/Term_Command.php b/src/Term_Command.php index ec47ae83..4927512d 100644 --- a/src/Term_Command.php +++ b/src/Term_Command.php @@ -93,6 +93,7 @@ class Term_Command extends WP_CLI_Command { * * These fields are optionally available: * + * * term_group * * url * * ## EXAMPLES