Fix geolocation redirect with querystring

This commit is contained in:
Mike Jolley 2015-09-07 16:58:05 +01:00
parent a056e3e649
commit 821434cbb7
2 changed files with 7 additions and 0 deletions

View File

@ -61,6 +61,9 @@ jQuery( function( $ ) {
}
}
});
// Append hashes on load
$append_hashes();
}
$( document.body ).on( 'added_to_cart', function() {

View File

@ -53,6 +53,10 @@ class WC_Cache_Helper {
$redirect_url = trailingslashit( home_url( $wp->request ) );
if ( ! empty( $_SERVER['QUERY_STRING'] ) ) {
$redirect_url = add_query_arg( $_SERVER['QUERY_STRING'], '', $redirect_url );
}
if ( ! get_option( 'permalink_structure' ) ) {
$redirect_url = add_query_arg( $wp->query_string, '', $redirect_url );
}