Skip to content

wp post create: Add JSON input support for tax_input #532

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

caribe
Copy link

@caribe caribe commented Apr 11, 2025

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.

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.
@caribe caribe requested a review from a team as a code owner April 11, 2025 15:55
Copy link

codecov bot commented Apr 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@swissspidy
Copy link
Member

Thanks for opening this PR.

Would you also be up for adding some tests to cover this change? See #133 for inspiration.

@swissspidy
Copy link
Member

I just added a test now, but it fails because tax_input requires the current user (which there technically isn't one with WP-CLI) to have the necessary capabilities. So we need to figure that one out first...

Related: https://github.com/orgs/wp-cli/discussions/6052

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants