WC_Customer_Download_Data_Store::delete()publicWC 1.0

Method to delete a download permission from the database.

Method of the class: WC_Customer_Download_Data_Store{}

No Hooks.

Return

null. Nothing (null).

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()

WC_Customer_Download_Data_Store::delete() code WC 8.7.0

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

	$download_id = $download->get_id();
	$this->delete_by_id( $download_id );

	$download->set_id( 0 );
}