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.

Return

true|false. True if deleted rows.

Usage

$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.

Changelog

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(
		$wpdb->prepare(
			"DELETE FROM {$wpdb->prefix}woocommerce_downloadable_product_permissions
			WHERE user_email = %s",
			$email
		)
	);
}