• What’s the best plugin for hiding WooCommerce prices unless a user is logged in? I have Booster for WooCommerce but am not sure I’m seeing an option there.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi,

    It’s possible with Booster. You’ll need to set “Make Empty Price” checkbox for “Guest” user role in “Price by User Role” module (in “WooCommerce > Settings > Booster > Prices & Currencies > Price by User Role”). Please let me know if you have any questions/issues with that.

    P.S. Additionaly, when you enable “Make Empty Price” in “Price by User Role” module, you can set custom message for not logged in users to show instead of price (e.g. “Please login to see price”) in “Call for Price” module (in “WooCommerce > Settings > Booster > Button & Price Labels > Call for Price”).

    Best regards,
    Tom

    Hi Lily,

    Yes, as Tom points out, that is the way to do so. You can even do product base hiding price per role (that is only available on pro version). I’m using it for my own website and it works GREAT.

    By the way Tom, I have sent a few requests for support, but im not getting a response back, are you on holidays or something?

    Thanks
    Kind regards

    Thread Starter lilyhoop

    (@lilyhoop)

    Thanks so much! It is all set up on https://www.henssgenhardware.com but if someone isn’t logged in, there is an error message when they go to add something to their cart. It says, “Sorry, this product is unavailable. Please choose a different combination.” How can I edit that message? I don’t mind buying the premium version of Booster but I want to know that the premium version will allow me to edit this message. Thank you!

    Hi Lily,

    The quickest and easiest way, would be to add this code to your functions.php of your child theme:

    add_filter( ‘gettext’, ‘customizing_product_variation_message’, 10, 3 );
    function customizing_product_variation_message( $translated_text, $untranslated_text, $domain )
    {
    if ($untranslated_text == ‘Sorry, this product is unavailable. Please choose a different combination.’) {
    $translated_text = __( ‘You need to be logged in to purchase the product. Please login and try again.’, $domain );
    }
    return $translated_text;
    }

    That code will replace the message, to what ever you want BEAR IN MIND that will do it allways, so if for some reason someone tryies to add an unavailable product, it will show same message (there are not many ocasions where that will happen)

    Hope that helps

    Thread Starter lilyhoop

    (@lilyhoop)

    Thanks! So, it does not say ‘Product not available’ anymore, but it says ‘Log in to view price’ when logged in. Not logged in, it does not show price. Logged in, it shows price AND the log in to view. So, that’s weird.

    How can I remove that text when the user is logged in?

    I have a silly question. The opposite actually.

    My users MUST be logged in to see pricing. I don’t want that. I want EVERYONE to see the pricing. How do I set that ?????

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Hide prices unless logged in?’ is closed to new replies.