Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1110216

    Hello Guys,

    Ik try to change the Woocommerce words Aanbieding! in the CSS.
    Like sale! in english. Because it is throuhg my text.
    Looked through al the files, can’t find it anywhere?

    I found this, but that gives me an error?
    <?php
    function prefix_woocommerce_sale_flash( $text ) {
    $text = ‘<span class=”onsale”>’. __( ‘Action!’, ‘text_domain’ ). ‘</span>’;
    return $text;
    }
    add_filter( ‘woocommerce_sale_flash’, ‘prefix_woocommerce_sale_flash’ );

    Can you please help me out?

    Thank You,

    Lianne

    #1110568

    Hey Lianne,
    Thank you for sharing the above filter, I was able to correct the errors by correcting the quotes.
    Try adding this code to the end of your functions.php file in Appearance > Editor:

    function prefix_woocommerce_sale_flash( $text ) {
      $text = '<span class="onsale">'. __( 'Action!', 'text_domain' ). '</span>';
      return $text;
      }
      add_filter( 'woocommerce_sale_flash', 'prefix_woocommerce_sale_flash' );

    I tested this on my localhost and it seems to work, please check.

    Best regards,
    Mike

    #1110635

    Hi Mike,

    Thanks for the answer, unfortuantly it doesn’t work for me or I did it in a wrong way.
    Could you please look at my theme editor?

    Very strange, I tried it another time and it worked!!!!

    So it’s solved :-)

    Thank you,

    Lianne

    • This reply was modified 5 years, 6 months ago by Lianne33.
    #1110705

    Hi,
    Glad to hear it’s solved, unless there is anything else we can help with on this issue, shall we close this then?

    Best regards,
    Mike

    #1110707

    Yes Mike it’s Oke to close. Thanxs again👍

    #1110708

    Hi,
    Glad we were able to help, we will close this now. Thank you for using Enfold.

    For your information, you can take a look at Enfold documentation here
    For any other questions or issues, feel free to start new threads in the Enfold forum and we will gladly try to help you :)

    Best regards,
    Mike

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Change Woocommerce text Aanbiding! into sale’ is closed to new replies.