woocommerce_download_file_xsendfile_file_path

FILTER woocommerce\includes\class-wc-download-handler.php (ligne 362) github
Fallback on force download method for remote files. This is because: 1. xsendfile needs proxy configuration to work for remote files, which cannot be assumed to be available on most hosts. 2. Force download method is more secure than redirect method if `allow_url_fopen` is enabled in `php.ini`.

Paramètres

Entrée :
$parsed_file_path['file_path'], $file_path, $filename, $parsed_file_path
Sortie :
N/A

Utilisation

// Modifier la valeur avec le filtre 'woocommerce_download_file_xsendfile_file_path'
add_filter('woocommerce_download_file_xsendfile_file_path', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre($parsed_file_path['file_path']) {
    // Modifier la valeur
    return $parsed_file_path['file_path'];
}

Actualités

Chargement des actualités...