The Hide Price and Add to Cart Button Plugin is a WooCommerce extension designed to provide enhanced control over product visibility and purchasing actions. This plugin allows administrators to hide or customize product prices and the “Add to Cart” button based on various conditions, including user roles, products, categories, tags, countries, and time schedules. It also supports rule implementation at the product level for granular control.
Features
Key Functionalities
- Customizable Rules: Create rules to hide or modify price and “Add to Cart” buttons for specific products, categories, or tags.
- User Role-Based Settings: Apply rules to specific user roles such as Administrator, Customer, Guest, etc.
- Country-Specific Restrictions: Limit functionality based on customer location.
- Schedule Rules: Define active rules using date ranges, time ranges, and specific days of the week.
- Flexible Actions:
- Show default price or replace it with custom text.
- Show, hide, or replace the “Add to Cart” button with custom text or links.
- Product-Level Implementation: Configure unique settings for individual products.
Benefits
- Enhanced Customization: Tailor the shopping experience to user roles and locations.
- Improved Conversion Rates: Use custom messaging to guide customers toward specific actions.
- Increased Control: Restrict access to prices and purchasing options based on flexible conditions.
Installation and Setup
Plugin Installation
- Log in to your WordPress dashboard.
- Go to Plugins > Add New.
- Click Upload Plugin and select the plugin ZIP file.
- Click Install Now.
- Once installed, click Activate.
Initial Configuration
- After activation, navigate to WooCommerce > Settings > Hide Price and Add to Cart Button.
- Configure global settings or begin adding rules for specific use cases.
Rule Configuration
Adding a New Rule
- Navigate to WooCommerce > Hide Price and Add to Cart Rules.
- Click Add New Rule.
- Configure the following sections:
Rule Title
Set a unique name for the rule to easily identify it.
Restriction Settings
- Product: Select specific products for the rule.
- Category: Choose categories to which the rule applies.
- Tag: Define rules for products with particular tags.
- Select Countries: Limit the rule to specific countries.
- Roles: Apply the rule to selected user roles (e.g., Administrator, Customer, Guest).
- Date Range: Specify the start and end date for the rule.
- Time Range: Set the active hours for the rule.
- Select Days: Choose specific days of the week (e.g., Monday, Tuesday).
Price and Add to Cart Button Settings
- Price:
- Show Default Price: Display the regular product price.
- Hide Price: Completely hide the product price.
- Replace Text: Replace the price with custom text (e.g., “Contact for Pricing”).
- Add to Cart Button:
- Show Default Button: Display the regular “Add to Cart” button.
- Hide Button: Remove the “Add to Cart” button.
- Replace Text and Link: Replace the button with custom text and redirect users to a specified link.
- Make Custom Button: Add a fully customizable button with a custom label and link.
Product-Level Settings
- Edit individual product pages and navigate to the Hide Price and Add to Cart tab to define product-specific rules.
Frontend Behavior
- Products will display customized price and “Add to Cart” button settings based on the applied rules.
- Hidden prices or buttons will be replaced by custom text or links, as defined.
- Customers attempting to interact with restricted products will see relevant error messages or custom text.
Example Scenarios
Scenario 1: Hide Price for Guests
- Settings: Hide price and “Add to Cart” button for guests.
- Use Case: Encourage visitors to log in or register.
- Frontend Behavior: Guests see “Log in to view price” instead of the price and button.
Scenario 2: Replace Add to Cart Button with a Custom Link
- Settings: Replace “Add to Cart” with “Contact Us” button linking to a contact form.
- Use Case: For products requiring inquiries before purchase.
- Frontend Behavior: Customers are redirected to the contact form.
Scenario 3: Country-Specific Pricing
- Settings: Show price only for customers in the United States.
- Use Case: Hide pricing for international visitors.
- Frontend Behavior: Non-US customers see “Unavailable in your region.”
FAQs
1. Can I hide prices for specific products?
Yes, use the “Product” option in the rule settings to target specific products.
2. How do I create a custom button?
Select the “Make Custom Button” option in the rule settings and define a label and link.
3. Can I schedule rules for specific times?
Yes, use the “Date Range” and “Time Range” fields to schedule rules.
4. Are rules applied to all user roles by default?
No, you must explicitly select the user roles in the rule settings.
5. How do country-specific rules work?
The plugin uses the customer’s IP address or shipping address to enforce country-specific restrictions.