Fix the download method when force SSL is on.
This commit is contained in:
parent
d6035d5da3
commit
6fcf4c1147
|
@ -172,6 +172,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
|
|||
* Fix - woocommerce_add_tinymce_lang array key.
|
||||
* Fix - Find_rates now works with both postcode and city together.
|
||||
* Fix - PrettyPhoto content clearfixed.
|
||||
* Fix - Fix the download method when force SSL is on.
|
||||
* Tweak - UX - Placeholder fades out on focus
|
||||
* Tweak - UX - Only display validation result on required fields
|
||||
* Localisation - NZ States
|
||||
|
|
|
@ -1040,7 +1040,12 @@ function woocommerce_download_product() {
|
|||
*/
|
||||
$scheme = parse_url( $file_path, PHP_URL_SCHEME );
|
||||
|
||||
if ( $scheme ) {
|
||||
/*
|
||||
* Because we sometimes 'force_ssl', do a http/https substituation manually here
|
||||
*/
|
||||
if ( $scheme == 'http' ) {
|
||||
$site_url = str_replace( 'https:', 'http:', site_url( '', $scheme ) );
|
||||
} elseif ( $scheme ) {
|
||||
$site_url = site_url( '', $scheme );
|
||||
} else {
|
||||
$site_url = is_ssl() ? str_replace( 'https:', 'http:', site_url() ) : site_url();
|
||||
|
|
Loading…
Reference in New Issue