How to change 0$ to Free

To change 0$ to Free, like this.

You can use this code to Store Page Header Injection

<script>
  function updatePrices() {
    document.querySelectorAll('.product-list-item-price, .product-price-value').forEach(price => {
      let text = price.innerText.trim().replace(/[^0-9.]/g, '');  
      if (text === '0.00' || text === '0') {  
        price.textContent = 'Free';  
      }
    });
  }

  document.addEventListener("DOMContentLoaded", function() {
    updatePrices();
    setTimeout(updatePrices, 1000);
  });

  document.body.addEventListener("DOMSubtreeModified", updatePrices);
</script>