;(function($){consttargetNode=document.getElementById('wrapper');constconfig={attributes:false,childList:true,subtree:false};constcallback=function(mutationsList,observer){if($('.wcpbc-price.loading').length){$(document.body).triggerHandler('wc_price_based_country_ajax_geolocation');observer.disconnect();}};// Create an observer instance linked to the callback functionconstobserver=newMutationObserver(callback);$(document.body).on('wc_price_based_country_after_ajax_geolocation',function(){// Start observing the target node for configured mutationsobserver.observe(targetNode,config);});observer.observe(targetNode,config);})(jQuery);
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.