WC_Customer_Download_Data_Store::delete_by_download_id( int $id )
Method to delete a download permission from the database by download ID.
Description Description
Parameters Parameters
- $id
-
(Required) download_id of the downloads that will be deleted.
Source Source
File: includes/data-stores/class-wc-customer-download-data-store.php
public function delete_by_download_id( $id ) {
global $wpdb;
$wpdb->query(
$wpdb->prepare(
"DELETE FROM {$wpdb->prefix}woocommerce_downloadable_product_permissions
WHERE download_id = %s",
$id
)
);
}