# Catalog Mode (Prices Without Purchasing)

> Turns the shop into a catalog: products and prices stay visible, but add to cart buttons, the cart and checkout are disabled for everyone.

- Type: PHP
- Runs: Run everywhere
- Category: [WooCommerce](https://wpide.com/library/category/woocommerce/)
- Requires: WooCommerce
- Tags: woocommerce, catalog, b2b
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/woo-catalog-mode/

## Code

```php
add_filter( 'woocommerce_is_purchasable', '__return_false', 99 );
add_filter( 'woocommerce_variation_is_purchasable', '__return_false', 99 );

add_action( 'template_redirect', function () {
    if ( function_exists( 'is_cart' ) && ( is_cart() || is_checkout() ) ) {
        wp_safe_redirect( wc_get_page_permalink( 'shop' ) );
        exit;
    }
} );

add_action( 'woocommerce_single_product_summary', function () {
    echo '<p class="wpide-catalog-note">' . esc_html( 'Contact us to order this product.' ) . '</p>';
}, 31 );
```

## Notes

Visitors who open the cart or checkout URL are sent back to the shop. Deactivate the snippet to start selling again.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Catalog Mode (Prices Without Purchasing)" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
