WC_Post_Data::delete_order_downloadable_permissions( int $postid )
Remove downloadable permissions on permanent order deletion.
Description Description
Parameters Parameters
- $postid
-
(Required) Post ID.
Source Source
File: includes/class-wc-post-data.php
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 );
}
}