Mini plugin: Disable WooCommerce prices and add to cart for visitors

Last Updated on: 15th October 2017, 11:41 am

This is a mini plugin that lets you hide WooCommerce prices
and the add to cart button for non logged in visitors of your site.

Install and activate to hide the elements site-wide.


Shop overview:


Screen Shot

Single Product page:

Screen Shot



Download Disable WooCommerce prices and add to cart for visitors plugin


Tested with:
WordPress 4.8.2
WooCommerce 3.2.1

8 responses

  1. QueenEve Avatar

    how does this plugin work?
    I mean how can I enable it

  2. Con Schneider Avatar
    Con Schneider

    Hi there,

    Download it here. Then upload and activate it like a normal plugin. There are no settings. Once activated the plugin is in effect.

  3. QueenEve Avatar

    Thank you for your reply and good job

    I tried the plugin, I need to change the Order Now button on single page to be “Login now to order”, now it shows empty space with no button
    Please check below

    1. Con Schneider Avatar
      Con Schneider

      Assuming the plugin is active and the button does not show, it is probably one of these things:

      * conflict with an active component (theme or plugin) – verify with conflict check:
      * an unsupported product type: This looks like a course product. What is the product type you are using?

  4. Alexander Avatar

    Remove add to cart from product pages. You can use this code in woocommerce.php (located wp-content/plugins/woocommerce):

    `function WpBlog() {

    remove_action( ‘woocommerce_after_shop_loop_item’, ‘woocommerce_template_loop_add_to_cart’);

    remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_add_to_cart’);

    return WooCommerce::instance();


    And for the specific product pages you can hide add to cart button by adding the code in functions.php

    `add_filter(‘woocommerce_is_purchasable’, ‘wpblog_specific_product’);

    function wpblog_specific_product($purchaseable_product_wpblog, $product)
    return ($product->id == specific_product_id (512) ? false : $purchaseable_product_wpblog);


    For reference you can see

    1. Con Schneider Avatar
      Con Schneider

      Thank you for the contribution. Have a good one.

  5. No funciona con wc 3.3.0

    1. Con Schneider Avatar
      Con Schneider

      Thank you for the input. I am pretty busy at the moment, but I ll try to take a look. Would you have any debugging message for me to start with?

Leave a Reply

Your email address will not be published. Required fields are marked *

Con Schneider