WC_REST_Posts_Controller::delete_post()protectedWC 1.0

Delete post.

Method of the class: WC_REST_Posts_Controller{}

No Hooks.

Return

null. Nothing (null).

Usage

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

WC_REST_Posts_Controller::delete_post() code WC 8.7.0

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