WordPress.org

Forums

WooCommerce Sold Out Products
[resolved] How can i change the button text? (6 posts)

  1. chrilleeboy
    Member
    Posted 1 year ago #

    Hello can i get help to change the text in the corner that say SOLD OUT!
    it would be so good to know ???

    thanks !

    http://wordpress.org/plugins/woocommerce-sold-out-products/

  2. chrilleeboy
    Member
    Posted 1 year ago #

    And is it possible to get the same button text direcly on the products page where you can see all products ?

  3. Kloon
    Member
    Plugin Author

    Posted 1 year ago #

    Hi

    The text will display on both archive pages as well as single pages.

    To change the text please add the following code to your theme's functions.php file

    add_filter( 'woocommerce_sold_out_flash', 'wc_custom_sold_out_flash_text' );
    function wc_custom_sold_out_flash_text( $text ) {
        return sprintf( '<span class="soldout">%s</span>', __( 'My New Text', 'wc-sold-out-products' ) );
    }
  4. chrilleeboy
    Member
    Posted 1 year ago #

    Thank you so much !!

  5. LogoLogics
    Member
    Posted 1 year ago #

    Thx works great for me too!

  6. Alex_Azov
    Member
    Posted 1 year ago #

    Gerhard, it works fine with desktop, but with jetpack mobile theme not. Maybe you have some decision?
    Thanks in advance, Alex!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce Sold Out Products
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.