WordPress at Your Fingertips
function is not described

WC_Customer_Download_Data_Store::delete_by_user_email() public WC 3.4.0

Method to delete a download permission from the database by user email.

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

No Hooks.


true|false. True if deleted rows.


$WC_Customer_Download_Data_Store = new WC_Customer_Download_Data_Store();
$WC_Customer_Download_Data_Store->delete_by_user_email( $email );
$email(string) (required)
email of the downloads that will be deleted.


Since 3.4.0 Introduced.

Code of WC_Customer_Download_Data_Store::delete_by_user_email() WC 5.8.0

public function delete_by_user_email( $email ) {
	global $wpdb;
	return (bool) $wpdb->query(
			"DELETE FROM {$wpdb->prefix}woocommerce_downloadable_product_permissions
			WHERE user_email = %s",