• I want not to visualize a cart, but to visualize a button – ADD TO CART.

    • This topic was modified 2 years, 4 months ago by Yui. Reason: not nsfw

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Hi @yordanivanov,
    To change the Button text use below code. Add this code in your function.php file.

    // To change add to cart text on single product page
    add_filter( 'woocommerce_product_single_add_to_cart_text', 'woocommerce_custom_single_add_to_cart_text' ); 
    function woocommerce_custom_single_add_to_cart_text() {
        return __( 'Add to Cart', 'woocommerce' ); 
    }
    
    // To change add to cart text on product archives(Collection) page
    add_filter( 'woocommerce_product_add_to_cart_text', 'woocommerce_custom_product_add_to_cart_text' );  
    function woocommerce_custom_product_add_to_cart_text() {
        return __( 'Add to Cart', 'woocommerce' );
    } 
Viewing 1 replies (of 1 total)
  • The topic ‘How to change the button buy with add to cart’ is closed to new replies.