WordPress at Your Fingertips
function is not described

WC_Post_Data::delete_order_downloadable_permissions() public WC 1.0

Remove downloadable permissions on permanent order deletion.

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

Return

null. Nothing.

Usage

$result = WC_Post_Data::delete_order_downloadable_permissions( $postid );
$postid(int) (required)
Post ID.

Code of WC_Post_Data::delete_order_downloadable_permissions() WC 5.7.1

public static function delete_order_downloadable_permissions( $postid ) {
	if ( in_array( get_post_type( $postid ), wc_get_order_types(), true ) ) {
		do_action( 'woocommerce_delete_order_downloadable_permissions', $postid );

		$data_store = WC_Data_Store::load( 'customer-download' );
		$data_store->delete_by_order_id( $postid );

		do_action( 'woocommerce_deleted_order_downloadable_permissions', $postid );
	}
}