WC_Customer_Download_Data_Store::delete_by_order_id( int $id )

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


Description Description


Parameters Parameters

$id

(Required) Order ID of the downloads that will be deleted.


Top ↑

Source Source

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

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

Top ↑

User Contributed Notes User Contributed Notes

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