WordPress at Your Fingertips
function is not described

WC_Customer_Download_Data_Store::delete() public WC 1.0

Method to delete a download permission from the database.

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

No Hooks.

Return

null. Nothing.

Usage

$WC_Customer_Download_Data_Store = new WC_Customer_Download_Data_Store();
$WC_Customer_Download_Data_Store->delete( $download, $args );
$download(WC_Customer_Download) (required) (passed by reference — &)
WC_Customer_Download object.
$args(array)
Array of args to pass to the delete method.
Default: array()

Code of WC_Customer_Download_Data_Store::delete() WC 5.8.0

public function delete( &$download, $args = array() ) {
	global $wpdb;

	$wpdb->query(
		$wpdb->prepare(
			"DELETE FROM {$wpdb->prefix}woocommerce_downloadable_product_permissions
			WHERE permission_id = %d",
			$download->get_id()
		)
	);

	$download->set_id( 0 );
}