I want to make WooCommerce description and review boxes unselectable for unregistered users. unfortunately there is zero information out there on how to do this.
Any help would be greatly appreciated 🙏
I want to make WooCommerce description and review boxes unselectable for unregistered users. unfortunately there is zero information out there on how to do this.
Any help would be greatly appreciated 🙏
2
Answers
For that you have to add blur css and set "user-select: none", "pointer-events: none".
Simple. This can be achieved on CSS or by making core changes to the theme you’re using. CSS method is simpler.
If your intention is to make the texts or buttons blurry for unregistered/guest users, you need to add 2 CSS rules.
For all users –
.woocommerce div.product .woocommerce-tabs .panel { filter: blur(5px); }
For logged in users alone –
If a user is logged in as an admin or customer, WordPress adds a class to the body "logged-in" – See pic below. Using that class
.logged-in .woocommerce div.product .woocommerce-tabs .panel{ filter: unset; }
Logged-in Class in WordPress
Explanation –
Adding the first rule will blur elements for all users but the second rule will override the first rule IF a customer is logged in to the website.