Skip to content

Commit

Permalink
Add dockblock to the woocommerce_file_download_method filter
Browse files Browse the repository at this point in the history
Co-authored-by: Claudio Sanches <[email protected]>
  • Loading branch information
hjoelr and claudiosanches authored Jul 28, 2020
1 parent ae5bd1e commit 61abc7c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions includes/class-wc-download-handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,13 @@ public static function download( $file_path, $product_id ) {
}

$filename = apply_filters( 'woocommerce_file_download_filename', $filename, $product_id );
/**
* Filter download method.
*
* @param string $method Download method.
* @param int $product_id Product ID.
* @param string $file_path URL to file.
*/
$file_download_method = apply_filters( 'woocommerce_file_download_method', get_option( 'woocommerce_file_download_method', 'force' ), $product_id, $file_path );

// Add action to prevent issues in IE.
Expand Down

0 comments on commit 61abc7c

Please sign in to comment.