Home / Admin / Button – Add to cart to Buy Now
Duplicate Snippet

Embed Snippet on Your Site

Button – Add to cart to Buy Now

Carla Mawyin
<10
Code Preview
php
<?php
add_filter( 'woocommerce_product_add_to_cart_text', function( $text ) {
    if ( 'Add to cart' == $text ) {
        $text = __( 'Buy Now', 'woocommerce' );
    }
    return $text;
} );

Comments

Add a Comment