Last active
July 31, 2020 20:56
-
-
Save afragen/ed00f34f8e03aeedb96bdbf6f3e50495 to your computer and use it in GitHub Desktop.
Needed for non https local EDD store to correctly run. Set $store_url to your local store URL.
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 | |
/** | |
* Plugin Name: Local EDD Store | |
* Description: Set `reject_unsafe_urls` to false for $store_url. $store_url will need to be set for the URL of your local EDD store. | |
* Author: Andy Fragen | |
* Version: 0.3 | |
* Gist Plugin URI: https://gist.github.com/afragen/ed00f34f8e03aeedb96bdbf6f3e50495 | |
*/ | |
add_filter( | |
'http_request_args', | |
function( $r, $url ) { | |
$store_url = 'eddstore.test'; | |
if ( false !== strpos( $url, $store_url ) ) { | |
$r['reject_unsafe_urls'] = false; | |
} | |
return $r; | |
}, | |
10, | |
2 | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment