WordPress at Your Fingertips
function is not described

WC_Customer_Download_Log_Data_Store::delete_by_permission_id() public WC 3.4.0

Method to delete download logs for a given permission ID.

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

No Hooks.

Return

null. Nothing.

Usage

$WC_Customer_Download_Log_Data_Store = new WC_Customer_Download_Log_Data_Store();
$WC_Customer_Download_Log_Data_Store->delete_by_permission_id( $id );
$id(int) (required)
download_id of the downloads that will be deleted.

Changelog

Since 3.4.0 Introduced.

Code of WC_Customer_Download_Log_Data_Store::delete_by_permission_id() WC 5.6.0

public function delete_by_permission_id( $id ) {
	global $wpdb;
	$wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->prefix}woocommerce_downloadable_product_permissions WHERE permission_id = %d", $id ) );
}