WC_Customer_Download_Data_Store::delete_by_user_id( int $id )
Method to delete a download permission from the database by user ID.
Description Description
Parameters Parameters
- $id
-
(Required) user ID of the downloads that will be deleted.
Return Return
(bool) True if deleted rows.
Source Source
File: includes/data-stores/class-wc-customer-download-data-store.php
public function delete_by_user_id( $id ) { global $wpdb; return (bool) $wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->prefix}woocommerce_downloadable_product_permissions WHERE user_id = %d", $id ) ); }
Changelog Changelog
Version | Description |
---|---|
3.4.0 | Introduced. |