How to change shipping cost label as $0 to Free ?
-
Hi,
I am using Woocommerce block and i saw when shipping cost set as free shipping that displied as $0 in Cart and Checkout page.
I want to change $0 to Free.
So i applied below JS code but it not works.
<script> let text = document.querySelector("#radio-control-0-free_shipping\\:2__description > span").innerHTML; document.querySelector("#radio-control-0-free_shipping\\:2__description > span").innerHTML = text.replace("$0", "Free !"); </script>
<script> let text = document.querySelector(".wc-block-formatted-money-amount.wc-block-components-formatted-money-amount ").innerHTML; document.querySelector(".wc-block-formatted-money-amount.wc-block-components-formatted-money-amount ").innerHTML = text.replace("$0", "Free !"); </script>
I’ve tried this code in different cases, and it worked.
But I don’t know why it doesn’t work on the cart page in WooCommerce.
Please let me know what am i missed.
Thank you.
The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to change shipping cost label as $0 to Free ?’ is closed to new replies.