I've got code:
if ($('.header').width() < 767 ){
$(".header__search").html('<a href="/cart" class="d-block xxxd"><img src="/wp-content/themes/img/cart.png" width="16px" /><span class="badge badge-warning" id="lblCartCount">'+$('#barba-wrapper > div > header > div.header__main > div > div.header__user > ul > li:nth-child(2) > a > span').text()+'</span></a>');
});
I need to replace url in href /cart to default wordpress :
<?php echo wc_get_cart_url() ?>
How to put it?