Skip to content

wp post delete on custom post type  #128

@smazur

Description

@smazur

Hi! Recently I found annoying issue with wp post delete command. I tried to trash some woocommerce products using this command and found that products where deleted completely from database instead. After digging into source code I found that this command uses wp_delete_post with $force_delete parameter. This parameter is very specific and works as expected only for 'post' and 'page' post types and for custom post types $force_delete doesn't have effect and they are always deleted by force.

I believe this is quite deceiving and leads to unexpected behavior. Please fix.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions