Don't require the --force flag for deleting already trashed posts · Issue #292 · wp-cli/entity-command · GitHub
Skip to content

Don't require the --force flag for deleting already trashed posts #292

Description

@ocean90

Bug Report

Describe the current, buggy behavior

The wp post delete command has this example

Running this example for a custom post type doesn't work because the --force flag is missing, introduced in #188.

Describe how other contributors can replicate this bug

  • Create a CPT
  • Create a post for that CPT and trash it manually
  • Now try to delete the post

Describe what you would expect as the correct outcome

The post should be deleted without a warning because it's already in trash.

Provide a possible solution

Skip the check in

if$status is trash.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions