WC_Order::is_download_permitted
Checks if product download is permitted.
Method of the class: WC_Order{}
Hooks from the method
Returns
true|false.
Usage
$WC_Order = new WC_Order(); $WC_Order->is_download_permitted();
WC_Order::is_download_permitted() WC Order::is download permitted code WC 10.5.0
public function is_download_permitted() {
/**
* Filter to check if an order is downloadable.
*
* @param bool $is_download_permitted Is the order downloadable.
* @param WC_Order $this Order object.
* @since 2.7.0
*/
return apply_filters( 'woocommerce_order_is_download_permitted', $this->has_status( OrderStatus::COMPLETED ) || ( 'yes' === get_option( 'woocommerce_downloads_grant_access_after_payment' ) && $this->has_status( OrderStatus::PROCESSING ) ), $this );
}