The easiest way to hide prices is using WPCode's ready-made snippet. This code will hide prices and cart buttons from specific products when users aren't logged in.
If you're already familiar with WPCode, you can simply find it in WPCode's snippet library .
Otherwise, if this is your first time using the plugin, just click the link below:
Hide Price & Add to Cart for Non Logged in Users for Specific Products
Then, click the 'Add to Site' button to get started.
Adding the WPCode code snippet to the site
At this point, you'll need to either create a free WPCode account or log in if you already have one.
During registration, you will be asked teacher database to connect your WordPress website with the WPCode library.
Logging in to deploy a WPCode code snippet
After logging in, you'll choose which website you want to add the snippet to.
Then, click 'Deploy.'
Selecting a website to deploy the WPCode code snippet into
The system will take you back to your WordPress admin area to finish the setup.
Here, just click 'Confirm & Install Snippet.'
Confirming to add the WPCode code snippet
This brings you to the code snippet editor, where you'll make two simple changes to customize the code for your needs.
Hide Price & Cart Buttons for Specific Products (Logged-Out Users)
-
- Posts: 72
- Joined: Thu Dec 26, 2024 5:28 am