Repository Forums Support WooCommerce Extended Coupon Features PRO Change FREE in WooCommerce Cart

Topic Resolution: Resolved
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #3757
    nailedgolf
    Participant

    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?

    #3762
    Soft79
    Keymaster

    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!

    #3764
    nailedgolf
    Participant

    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.

    #3765
    Soft79
    Keymaster

    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.

    #3766
    nailedgolf
    Participant

    Yep, that was the issue. I copied/pasted it from this post and it worked. Thanks.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.