woocommerce_downloadable_file_permission

FILTER woocommerce\includes\wc-order-functions.php (ligne 453) github
Grant downloadable product access to the file identified by $download_id.

Paramètres

Entrée :
$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.

Utilisation

// 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;
}

Actualités

Chargement des actualités...