WC_Customer_Download_Data_Store::delete_by_id( int $id )

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


Description Description


Parameters Parameters

$id

(Required) permission_id of the download to be deleted.


Top ↑

Source Source

File: includes/data-stores/class-wc-customer-download-data-store.php

	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
			)
		);
	}

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.