[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:
parent
58468d8821
commit
fde904b27a
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue