[Resolved] Change "Read more" button in woocommerce

Home Forums Support [Resolved] Change "Read more" button in woocommerce

Home Forums Support Change "Read more" button in woocommerce

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #788849
    Christopher

    Hi there,

    How can I change the text on “read more” button in woocommerce. I tried in “customize > blog” but that only changes the entries button.

    Any suggestion?

    Thanks !!

    #789129
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    You could try this:

    add_filter( 'woocommerce_product_add_to_cart_text', function( $text ) {
        if ( 'Read more' == $text ) {
            $text = __( 'More Info', 'woocommerce' );
        }
    
        return $text;
    } );

    Let me know πŸ™‚

    #789151
    Christopher

    it worked , thank you very much Tom !

    #789466
    Tom
    Lead Developer
    Lead Developer

    You’re welcome πŸ™‚

    #1112794
    Julia

    Hey Tom,

    Where the code you give us need to add to? Pls, give me the path (Filename). Thanks!

    #1112802
    Leo
    Staff
    Customer Support
    #1112808
    Julia

    Hey Leo,

    I didn’t mean that. I am facing the same issue as Christopher. I want to know where to add this

    add_filter( ‘woocommerce_product_add_to_cart_text’, function( $text ) {
    if ( ‘Read more’ == $text ) {
    $text = __( ‘More Info’, ‘woocommerce’ );
    }

    return $text;
    } );

    #1112824
    Leo
    Staff
    Customer Support

    That PHP snippet needs to be added using one of the methods I linked here:
    https://generatepress.com/forums/topic/change-read-more-button-in-woocommerce/#post-1112802

    #1636240
    Kyle Thomas

    I can’t seem to get this php to work. Could there be a new version of this function?

    #1636252
    Leo
    Staff
    Customer Support

    That filter should still be valid πŸ™‚

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