mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-04-29 11:32:21 +08:00
woocommerce_variation_is_purchasable filter was not needed. Also, replace Read More text with More Info.
8 lines
248 B
Text
8 lines
248 B
Text
add_filter( 'woocommerce_is_purchasable', '__return_false' );
|
|
add_filter( 'woocommerce_product_add_to_cart_text', function( $text ) {
|
|
if ( 'Read more' == $text ) {
|
|
$text = __( 'More Info', 'woocommerce' );
|
|
}
|
|
|
|
return $text;
|
|
} );
|