Make all products not purchasable and replace add to cart text wording in WooCommerce

Make all products not purchasable and replace add to cart text wording if using WooCommerce on your child site.

Snippet Type

Execute on Child Sites

Snippet

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

Example.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.