WC_Customer_Download_Data_Store::delete_by_user_email()publicWC 3.4.0

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

{} Это метод класса: WC_Customer_Download_Data_Store{}

Хуков нет.


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(строка) (обязательный)
email of the downloads that will be deleted.

Список изменений

С версии 3.4.0 Введена.

Код WC_Customer_Download_Data_Store::delete_by_user_email() WC 6.4.1

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",