Automattic\WooCommerce\Internal\DataStores\Orders

OrdersTableDataStore::set_download_permissions_granted()publicWC 1.0

Stores information about whether permissions were generated yet.

Method of the class: OrdersTableDataStore{}

No Hooks.

Return

null. Nothing.

Usage

$OrdersTableDataStore = new OrdersTableDataStore();
$OrdersTableDataStore->set_download_permissions_granted( $order, $set );
$order(\WC_Order) (required)
Order ID or order object.
$set(true|false) (required)
True or false.

OrdersTableDataStore::set_download_permissions_granted() code WC 7.1.1

public function set_download_permissions_granted( $order, $set ) {
	if ( is_int( $order ) ) {
		$order = wc_get_order( $order );
	}
	$order->set_download_permissions_granted( $set );
	$order->save();
}