WordPress at Your Fingertips
function is not described

WC_REST_Posts_Controller::delete_post() protected WC 1.0

Delete post.

{} It's a method of the class: WC_REST_Posts_Controller{}

No Hooks.

Return

null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->delete_post( $post );
$post(WP_Post) (required)
Post object.

Code of WC_REST_Posts_Controller::delete_post() WC 5.9.0

protected function delete_post( $post ) {
	wp_delete_post( $post->ID, true );
}