Created
June 18, 2020 14:19
-
-
Save jessepearson/068b9591619eef50b1b871dad092e72d to your computer and use it in GitHub Desktop.
Attempts to remove all shutdown actions if file is being downloaded via WC.
This file contains 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
<?php // only copy this line if needed | |
/** | |
* Attempts to remove all shutdown actions if file is being downloaded via WC. | |
*/ | |
function remove_all_shutdown_actions_20200618() { | |
remove_all_actions( 'shutdown' ); | |
} | |
add_action( 'woocommerce_download_file_redirect', 'remove_all_shutdown_actions_20200618', 1 ); | |
add_action( 'woocommerce_download_file_xsendfile', 'remove_all_shutdown_actions_20200618', 1 ); | |
add_action( 'woocommerce_download_file_force', 'remove_all_shutdown_actions_20200618', 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment