Modify "Sale" badge text - by Jigar

This topic has 4 replies, 2 voices, and was last updated 8 years, 2 months ago ago by Robert Hall

  • Avatar: Jigar
    Jigar
    Participant
    February 9, 2016 at 12:38

    Hello,

    How can I modify “sale” badge text?

    Already tried below function but it is not working for me

    add_filter( ‘woocommerce_sale_flash’, ‘wc_custom_replace_sale_text’ );
    function wc_custom_replace_sale_text( $html ) {
    return str_replace( __( ‘Sale!’, ‘woocommerce’ ), __( ‘My sale text!’, ‘woocommerce’ ), $html );
    }

    3 Answers
    Avatar: Robert Hall
    Robert Hall
    Support staff
    February 9, 2016 at 12:48

    Hello,

    This question is a bit unclear for us. Could you please clarify us with more details?
    Do you mean ‘Sale’ label on the product item like on screenshot? http://prntscr.com/a0ycpa

    Regards,
    Robert Hall.

    Avatar: Jigar
    Jigar
    Participant
    February 9, 2016 at 12:50

    Hey Robert,

    Yes exactly. As in screenshot.

    Thanks
    John

    Avatar: Robert Hall
    Robert Hall
    Support staff
    February 9, 2016 at 13:19

    You need edit \wp-content\themes\woopress\woocommerce\loop\sale-flash.php file.

    Regards,
    Robert Hall.

  • Viewing 4 results - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.