• Resolved matarelovejoy

    (@matarelovejoy)


    Hi,

    I would like to change the add to cart button on the single product page text to “Buy Unbranded”. Please kindly assist with the function to do that.

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

Viewing 1 replies (of 1 total)
  • Thread Starter matarelovejoy

    (@matarelovejoy)

    To anyone who experience the same issue, add the function below to your functions.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 __( 'Buy Unbranded', '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 __( 'Buy Unbranded', 'woocommerce' );  
    }
Viewing 1 replies (of 1 total)
  • The topic ‘Change Add to Cart Button Text & Add Another Button’ is closed to new replies.