Created
March 12, 2023 23:24
-
-
Save LittleMikeNZ/19e19509ae5f950f42fb44df18548a7e to your computer and use it in GitHub Desktop.
Woocommerce: Prevent a downloadable product forcing a download to browser on order completion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'woocommerce_download_file_redirect', 'stop_download_after_checkout', 10, 2 ); | |
function stop_download_after_checkout( $redirect, $download_id ) { | |
$redirect = false; | |
return $redirect; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment