Repository › Forums › Support › WooCommerce Extended Coupon Features PRO › Change FREE in WooCommerce Cart
Hello, I would like to change the word FREE under total when the free product coupon is entered. Can you please tell me how I can do this?
Make sure you are using a child theme.
Paste the following in functions.php of your child theme:
add_filter( 'wjecf_free_cart_item_price', function() { return 'Bonus!'; } ); add_filter( 'wjecf_free_cart_item_subtotal', function() { return 'Bonus!'; } );
This will change the text to Bonus!
Thank you for the code. I added it to the functions.php child theme and it returned this error: syntax error, unexpected ‘&’
I also checked the cart and it hasn’t changed.
What did you paste, then? There is no ‘&’ in my snippet. Please copy the snippet as is from here. Don’t copy from the ‘new message’-email.
Yep, that was the issue. I copied/pasted it from this post and it worked. Thanks.