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`.
$file_path, $filename
Sortie :
// Ajouter une fonction au hook action 'woocommerce_download_file_force'
add_action('woocommerce_download_file_force', 'ma_fonction_personnalisee', 10, 1);
function ma_fonction_personnalisee($file_path, $filename) {
// Votre code ici
error_log('Hook woocommerce_download_file_force déclenché');
}
Chargement des actualités...