woocommerce_order_is_download_permitted хук-фильтрWC 1.0

Checks if product download is permitted.

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

add_filter( 'woocommerce_order_is_download_permitted', 'wp_kama_woocommerce_order_is_download_permitted_filter', 10, 2 );

/**
 * Function for `woocommerce_order_is_download_permitted` filter-hook.
 * 
 * @param  $condition 
 * @param  $that      
 *
 * @return 
 */
function wp_kama_woocommerce_order_is_download_permitted_filter( $condition, $that ){

	// filter...
	return $condition;
}
$condition
-
$that
-

Где вызывается хук

WC_Order::is_download_permitted()
woocommerce_order_is_download_permitted
woocommerce/includes/class-wc-order.php 1623
return apply_filters( 'woocommerce_order_is_download_permitted', $this->has_status( 'completed' ) || ( 'yes' === get_option( 'woocommerce_downloads_grant_access_after_payment' ) && $this->has_status( 'processing' ) ), $this );

Где используется хук в WooCommerce

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