[2.4] Fixed redirection loop on customizer screen

It's caused an redirection loop on the customizer page when
activated "Geolocate (with page caching support)" option

cc @mikejolley
This commit is contained in:
Claudio Sanches 2015-11-04 01:20:16 -02:00
parent 58468d8821
commit fde904b27a
2 changed files with 7 additions and 1 deletions

View File

@ -40,7 +40,12 @@ jQuery( function( $ ) {
}
};
if ( '1' !== wc_geolocation_params.is_checkout && '1' !== wc_geolocation_params.is_cart && '1' !== wc_geolocation_params.is_account_page ) {
if (
'1' !== wc_geolocation_params.is_checkout &&
'1' !== wc_geolocation_params.is_cart &&
'1' !== wc_geolocation_params.is_account_page &&
'1' !== wc_geolocation_params.is_customize
) {
$.ajax( $geolocate_customer );
// Support form elements

View File

@ -258,6 +258,7 @@ class WC_Frontend_Scripts {
'is_cart' => is_cart() ? '1' : '0',
'is_account_page' => is_account_page() ? '1' : '0',
'is_checkout' => is_checkout() ? '1' : '0',
'is_customize' => is_customize_preview() ? '1' : '0',
'hash' => isset( $_GET['v'] ) ? wc_clean( $_GET['v'] ) : ''
);
break;