WooCommerce is easily the most popular plugin to add e-commerce functionality to WordPress. But what if you just want a catalog site without the cart functionality?

Well, easy. There’s a paid WooCommerce extension for that.

I don’t know how the paid extension does it. I haven’t used it or looked at it. But you can do it yourself if you’re feeling ambitious. What follows is how I’ve done it. It may not be as slick as the paid extension, but here you go. Your mileage may vary.

You can put the code I’m going to give you into your own plugin, or you can put it in your theme’s functions.php file.

Also, if you’re trying this without being familiar with WordPress coding, keep in mind you’re doing this at your own risk.

Part 0 — Make sure WooCommerce Is Active Before doing WooCommerce Stuff

None of what follows is going to make any sense unless WooCommerce is actually installed and active. And since we’re dealing with templating stuff, we should probably hook it where a theme (or child theme) can deal with it. So, first, let’s put all our code into a function and hook the whole thing to after_setup_theme. Then within our function, we’ll wrap everything we’re going to do with a big if:

function our_woocommerce_modifications() {
    if ( class_exists( 'WooCommerce' ) ) {

        // do WooCommerce modification stuff

    } // end if class_exists
} // end our_woocommerce_modifications()
add_action( 'after_setup_theme', 'our_woocommerce_modifications' );

Ok. Now we can add the rest where it says // do WooCommerce modification stuff.

Part 1 — Don’t install the cart pages

When you install the WooCommerce plugin, the first thing it wants you to do is to install all the account and cart pages. But if you’re not checking stuff out, there’s really no sense in having them there. So don’t click the button to install them. Instead, we’re going to get WooCommerce to just stop nagging us about not having them.

What we need to check the status of the WooCommerce install notice, and if it’s set, get rid of it. Fortunately, WooCommerce gives us a couple functions to do that. Here’s the code:

if ( WC_Admin_Notices::has_notice( 'install' ) ) {
    WC_Admin_Notices::remove_notice( 'install' );
}

Part 2 — Remove the Add-To-Cart Buttons

The cart button is displayed with products as part of the WooCommerce “shop loop” and on single product summaries, so we’ll just remove that from the list of things that get displayed in those two locations:

remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );

Easy-peasy! Just note, that the priority for the product summary hook is 30!

Bonus — Remove and/or Replace the Price

If you want to you can also get rid of the price field on items by removing woocommerce_template_loop_price and woocommerce_template_single_price in the same way. Then you’re free to put your own wording in for price. For example, you could have your own price display function (defined separately from the function you added in Part 0) something like:

function our_woocommerce_price_placeholder() {
    echo '<span class="price-placeholder">Please Call for Pricing</span>';
}

Then, within the our_woocommerce_modifications() code, you can add:

add_action( 'woocommerce_after_shop_loop_item', 'our_woocommerce_price_placeholder' );
add_action( 'woocommerce_single_product_summary', 'our_woocommerce_price_placeholder' );

Conclusion

And there you have it: WooCommerce installed with no cart functionality. It’s probably not as slick as the paid plugin. You don’t get to set options in the admin about what shows up and what doesn’t. But, in a pinch, this might do. And you might get some other ideas about modifying the way WooCommerce displays products.

Good luck!