[Support request] hoch to change the button ADD TO CART into SEE MORE DETAILS?

Home Forums Support [Support request] hoch to change the button ADD TO CART into SEE MORE DETAILS?

Home Forums Support hoch to change the button ADD TO CART into SEE MORE DETAILS?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2386136
    Robert

    Hi

    I addes into my shop, via: Code Snippets, this code:

    add_filter( ‘woocommerce_product_add_to_cart_text’, function( $text ) {
    if ( ‘Wybierz opcje’ == $text ) {
    $text = __( ‘Zobacz szczegóły’, ‘woocommerce’ );
    }

    return $text;
    } );

    Now, if a product have few different variants, if I click on the button “Zobacz szczegóły” whats meens: “See more details,” under the image
    i go to a new page with more details.

    But if I have a simple product without any variants, I see under the image the button: “Dodaj do koszyka”, what meens “Add to cart”.

    It’s passibe to add any new PHP code what would be passible to change the funktion of the button under a simple product, that he would works like the
    button under products which have few different variants?

    Kr
    RObert

    #2386139
    Leo
    Staff
    Customer Support

    Hi Robert,

    The woocommerce_product_add_to_cart_text is a core filter from WooCommerce itself so I’d recommend checking with their support team.

    I did a little Google search and perhaps this would help:
    https://gist.github.com/deckerweb/cf466e017fd01d503469

    There are lots of examples of using this filter as well if you google woocommerce_product_add_to_cart_text.

    Hope this helps 🙂

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