Skip to content

Commit 588d8b9

Browse files
authored
wp post create: Add JSON input support for tax_input
Fixes this 10 year old issue wp-cli/wp-cli#1323 (closed, but not fixed). `wp post create` parameter `--tax_input` is supposed to be an array, but no JSON parsing is done and therefore is unusable.
1 parent d7b61a2 commit 588d8b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Post_Command.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ public function create( $args, $assoc_args ) {
186186
WP_CLI::warning( "The 'meta_input' field was only introduced in WordPress 4.4 so will have no effect." );
187187
}
188188

189-
$array_arguments = [ 'meta_input' ];
189+
$array_arguments = [ 'meta_input', 'tax_input' ];
190190
$assoc_args = Utils\parse_shell_arrays( $assoc_args, $array_arguments );
191191

192192
if ( isset( $assoc_args['from-post'] ) ) {

0 commit comments

Comments
 (0)