---
title: "WooCommerce in catalogue mode for unregistered users"
description: "The other day our client EuroPalets Group set us an interesting challenge, to set up on their website under WooCommerce 2.3 a shop and an online catalogue at the same time. Specifically, a virtual catalogue for their visitors and an"
url: https://artprojectgroup.com/woocommerce-in-catalogue-mode-for-unregistered-users
date: 2015-05-27
modified: 2026-10-02
author: "Art Project Group"
image: https://artprojectgroup.com/wp-content/uploads/2023/04/woocommerce-blog.webp
categories: ["Tutorials"]
tags: ["Clients", "CSS", "E-commerce", "functions.php", "PHP", "WooCommerce", "WooCommerce plugins"]
type: post
lang: en-US
---

# WooCommerce in catalogue mode for unregistered users

The other day our client [**EuroPalets Group**](https://europaletsgroup.com) set us an interesting challenge, to set up on their website under WooCommerce 2.3 a shop and an online catalogue at the same time. Specifically, a virtual catalogue for their visitors and an online shop for their registered users.

The problem is that we could not find any plugin for WooCommerce that would let us show an online catalogue to visitors and a standard online shop to registered users.

### Solution

The first thing we did was to deactivate the option *Enable registration on the “My account” page*, which is found in *WooCommerce -> Settings -> Accounts*. In this way **EuroPalets Group** makes sure that no visitor registers improperly on the online shop.

Then we created a series of PHP functions in the *functions.php* file of the child theme that make the add to cart button not be shown on a product or in the product listings. It also completely hides the prices and the cart located in the header, by means of a CSS stylesheet, and sets the cart and checkout pages to *Draft* status.

Here you have the PHP code used in our case:

Copy to clipboardSyntax Highlighter/* Catalogue mode */
function apg_hide_cart() {
if ( !is_user_logged_in() ) {
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', has_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart' ) );
}
}
add_action( 'woocommerce_single_product_summary', 'apg_hide_cart', 10 );

function apg_hide_cart_loop() {
if ( !is_user_logged_in() ) {
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', has_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart' ) );
}
}
add_action( 'woocommerce_before_shop_loop_item_title', 'apg_hide_cart_loop', 5 );

//We load an additional stylesheet
function apg_add_stylesheet() {
if ( !is_user_logged_in() ) {
wp_enqueue_style( 'catalogue-style', get_stylesheet_directory_uri() . '/catalogue.css' );
}
}
add_action( 'wp_enqueue_scripts', 'apg_add_stylesheet' );

//We show the cart and checkout pages to signed-in users
function apg_check_status() {
$pages = array( get_option( 'woocommerce_cart_page_id' ), get_option( 'woocommerce_checkout_page_id' ) );
if ( is_user_logged_in() ) {
foreach ( $pages as $page ) {
if ( get_post_status( $page ) != 'publish' ) {
$page = array( 'ID' => $page, 'post_status' => 'publish' );
wp_update_post( $page );
}
}
} else {
foreach ( $pages as $page ) {
if ( get_post_status( $page ) != 'draft' ) {
$page = array( 'ID' => $page, 'post_status' => 'draft' );
wp_update_post( $page );
}
}
}
}
add_action( 'init', 'apg_check_status' );
And the CSS stylesheet used, in our specific case, inside the *catalogo.css* file:

Copy to clipboardSyntax Highlighter.add_to_cart_button, #product_price, .tb_price_holder, #cart_menu, #shop_info .amount {
display: none !important;
}

### Result

If the visitor is not a registered user they will see an online catalogue similar to this screenshot:

[![EuroPalets Group in virtual catalogue mode](https://artprojectgroup.com/wp-content/uploads/2015/05/europalets-group-en-modo-catalogo-virtual.webp)](https://artprojectgroup.com/wp-content/uploads/2015/05/europalets-group-en-modo-catalogo-virtual.webp)

Whereas if the visitor is a registered user they will see an online shop similar to this other screenshot:

[![EuroPalets Group](https://artprojectgroup.com/wp-content/uploads/2015/05/europalets-group.webp)](https://artprojectgroup.com/wp-content/uploads/2015/05/europalets-group.webp)

### Conclusion

In this very simple way we have given a simple and elegant solution to the demand set by **EuroPalets Group**, creating a catalogue and an online shop at the same time on a single website.

We hope you like this small tutorial and find it useful.

We look forward to your comments and contributions.
