Code-Snippets-Functions/Execute a function on a child site/WooCommerce/change-read-more-button-text.txt

7 lines
186 B
Text

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