Grant downloadable product access to the file identified by $download_id.
$download, $product, $order, $qty, $item
Sortie :
@param string $download_id File identifier. @param int|WC_Product $product Product instance or ID. @param WC_Order $order Order data. @param int $qty Quantity purchased. @param WC_Order_Item $item Item of the order. @return int|bool insert id or false on failure.
// Modifier la valeur avec le filtre 'woocommerce_downloadable_file_permission'
add_filter('woocommerce_downloadable_file_permission', 'ma_fonction_filtre', 10, 1);
function ma_fonction_filtre($download) {
// Modifier la valeur
return $download;
}
Chargement des actualités...