WC_Customer_Download_Data_Store::delete_by_id()publicWC 1.0

Method to delete a download permission from the database by ID.

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

Хуков нет.

Возвращает

null. Ничего.

Использование

$WC_Customer_Download_Data_Store = new WC_Customer_Download_Data_Store();
$WC_Customer_Download_Data_Store->delete_by_id( $id );
$id(int) (обязательный)
permission_id of the download to be deleted.

Код WC_Customer_Download_Data_Store::delete_by_id() WC 6.4.1

public function delete_by_id( $id ) {
	global $wpdb;
	$wpdb->query(
		$wpdb->prepare(
			"DELETE FROM {$wpdb->prefix}woocommerce_downloadable_product_permissions
			WHERE permission_id = %d",
			$id
		)
	);
}