Code-Snippets-Functions/Execute a function on a child site/WooCommerce/make-all-products-not-purchasable.txt
Sebastian Moran 48611ee27a
Update make-all-products-not-purchasable.txt
woocommerce_variation_is_purchasable filter was not needed. Also, replace Read More text with More Info.
2020-07-24 10:29:14 -06:00

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;
} );