rebase on oct-10-2023
This commit is contained in:
@@ -1 +1 @@
|
||||
jQuery(function(a){var n=!1;var e,o=function(){n&&a('a[href^="'+wc_geolocation_params.home_url+'"]:not(a[href*="v="]), a[href^="/"]:not(a[href*="v="])').each(function(){var e=a(this),o=e.attr("href"),t=o.split("#");o=0<(o=t[0]).indexOf("?")?o+"&v="+n:o+"?v="+n,"undefined"!=typeof t[1]&&null!==t[1]&&(o=o+"#"+t[1]),e.attr("href",o)})},t={url:wc_geolocation_params.wc_ajax_url.toString().replace("%%endpoint%%","get_customer_location"),type:"GET",success:function(e){e.success&&e.data.hash&&e.data.hash!==n&&c(e.data.hash)}},c=function(e){Cookies.set("woocommerce_geo_hash",e,{expires:1/24});var o=0<(o=window.location.toString()).indexOf("?v=")||0<o.indexOf("&v=")?o.replace(/v=[^&]+/,"v="+e):0<o.indexOf("?")?o+"&v="+e:o+"?v="+e;window.location=o};("string"!=typeof(e=Cookies.get("woocommerce_geo_hash"))||!e.length||(n=e,0)||n&&new URLSearchParams(window.location.search).get("v")!==n)&&a.ajax(t),n&&a("form").each(function(){var e=a(this),o=e.attr("method"),t=0<e.find('input[name="v"]').length;o&&"get"===o.toLowerCase()&&!t?e.append('<input type="hidden" name="v" value="'+n+'" />'):(o=e.attr("action"))&&(0<o.indexOf("?")?e.attr("action",o+"&v="+n):e.attr("action",o+"?v="+n))}),o(),a(document.body).on("added_to_cart",function(){o()}),a(document.body).on("woocommerce_append_geo_hashes",function(){o()})});
|
||||
jQuery(function(e){var o=!1;var t,a=function(){o&&e('a[href^="'+wc_geolocation_params.home_url+'"]:not(a[href*="v="]), a[href^="/"]:not(a[href*="v="])').each(function(){var t=e(this),a=t.attr("href"),n=a.split("#");a=(a=n[0]).indexOf("?")>0?a+"&v="+o:a+"?v="+o,"undefined"!=typeof n[1]&&null!==n[1]&&(a=a+"#"+n[1]),t.attr("href",a)})},n={url:wc_geolocation_params.wc_ajax_url.toString().replace("%%endpoint%%","get_customer_location"),type:"GET",success:function(e){e.success&&e.data.hash&&e.data.hash!==o&&i(e.data.hash)}},i=function(e){Cookies.set("woocommerce_geo_hash",e,{expires:1/24});var o=window.location.toString();o=o.indexOf("?v=")>0||o.indexOf("&v=")>0?o.replace(/v=[^&]+/,"v="+e):o.indexOf("?")>0?o+"&v="+e:o+"?v="+e,window.location=o};("string"!=typeof(t=Cookies.get("woocommerce_geo_hash"))||!t.length||(o=t,0)||o&&new URLSearchParams(window.location.search).get("v")!==o)&&e.ajax(n),o&&e("form").each(function(){var t=e(this),a=t.attr("method"),n=t.find('input[name="v"]').length>0;if(a&&"get"===a.toLowerCase()&&!n)t.append('<input type="hidden" name="v" value="'+o+'" />');else{var i=t.attr("action");i&&(i.indexOf("?")>0?t.attr("action",i+"&v="+o):t.attr("action",i+"?v="+o))}}),a(),e(document.body).on("added_to_cart",function(){a()}),e(document.body).on("woocommerce_append_geo_hashes",function(){a()})});
|
||||
Reference in New Issue
Block a user