WC_Post_Data::delete_order_downloadable_permissions()
Remove downloadable permissions on permanent order deletion.
Method of the class: WC_Post_Data{}
Hooks from the method
Returns
null
. Nothing (null).
Usage
$result = WC_Post_Data::delete_order_downloadable_permissions( $postid );
- $postid(int) (required)
- Post ID.
WC_Post_Data::delete_order_downloadable_permissions() WC Post Data::delete order downloadable permissions code WC 9.8.5
public static function delete_order_downloadable_permissions( $postid ) { if ( OrderUtil::is_order( $postid, wc_get_order_types() ) ) { 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 ); } }