Salta al contenuto
var url = document.body.classList.contains('logged-in') ? ACCOUNT_URL : LOGIN_URL;
a.setAttribute('href', url);
a.setAttribute('rel', 'nofollow'); // opzionale
});
}
if(document.readyState==='loading'){
document.addEventListener('DOMContentLoaded', wireAccountIcon);
} else {
wireAccountIcon();
}
// In caso l'header venga ricaricato via AJAX
document.addEventListener('wc_fragments_loaded', wireAccountIcon);
})();