Created
March 14, 2021 15:00
-
-
Save ajgagnon/e4f40dfbf7d8da482c7a361f574ce236 to your computer and use it in GitHub Desktop.
Use a hash instead of email to prevent issues with Cloudflare
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
| <?php | |
| $email_hash = function_exists( 'hash' ) ? hash( 'sha256', $downloadable_product_permission->user_email ) : sha1( $downloadable_product_permission->user_email ); | |
| $files[ $download_id ]['download_url'] = trailingslashit( get_option( 'home' )) .'?download_file='.$item_product_id.'&order='. $downloadable_product_permission->order_key .'&uid='. $email_hash .'&key='. $download_id; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment