Conditional Add to Cart for WooCommerce
Conditionally hide, disable, customize, or replace the WooCommerce Add to Cart button — no code required. Conditional Add to Cart lets you create rules that automatically control the “Add to Cart” button based on conditions you define. Hide the button for guests, disable it until a minimum order is met, replace it with a quote form for wholesale customers, or restrict purchases by country or user role. Perfect for wholesale stores, B2B shops, membership sites, and any WooCommerce store with special purchasing requirements. Common Use Cases Wholesale & B2B Stores – Hide Add to Cart for guests, require login to see pricing – Show “Request Quote” button for wholesale user roles – Different buttons for different customer roles Minimum Order Requirements – Disable Add to Cart until cart reaches a minimum subtotal – Show “Minimum $50 Required” message until threshold is met – Custom messages for minimum order rules Restrict Purchase by User Role – Show products only to specific WordPress user roles – “Members Only” access for logged-in users – Different Add to Cart behavior per role Geographic Restrictions – Hide Add to Cart for customers in specific countries – “Not Available in Your Region” messages – Country-specific purchasing rules Pre-Orders & Coming Soon – “Pre-Order – Ships March 15” custom buttons – “Coming Soon – Notify Me” for unreleased products – Custom launch date messaging Key Features Multiple Rules System Create multiple rules. Each rule can have different conditions, target different products, and perform different actions. Powerful Conditions Product Conditions: Product Price – Target items within a price range Product Stock Status – Target items with a defined stock status Product Tag – Target items by product tag Product Attribute (Pro) – Target items by any product attribute value (color, size, material, etc.) Product on Sale (Pro) – Target items with active sale prices Cart Conditions: Cart Contains Product – Check if specific products are in cart Cart Quantity – Total number of items in cart Cart Subtotal – Cart value before tax/shipping Cart Total – Final cart value including tax/shipping Cart Contains Category (Pro) – Check if category products are in cart User Conditions: User Role – Target by WordPress user role (Customer, Wholesale, Subscriber, etc.) User Login Status – Logged in or guest User Country – Geographic targeting (multiple countries supported) Time Conditions (Pro): Time – Daily recurring time windows (business hours, flash sales) Date/Time – Specific dates and times (product launches, deadlines) Day of Week – Target specific days (weekdays, weekends, etc.) 5 Powerful Actions Disable Purchase – Disable the Add to Cart button completely with optional custom message Customize Button – Change button text, colors, and add a redirect URL Replace Button – Show custom HTML, shortcodes, or alternative content Request Quote (Pro) – Display a quote form with email notifications and custom fields Hide Price (Pro) — Any rule can optionally hide the product price. Replace it with custom text like “Login to see price” with an optional link. Combines with any action — hide price + show quote button, hide price + disable purchase, etc. Flexible Product Targeting All Products – Apply rule to entire store Specific Products – Select individual products from searchable dropdown Product Categories – Target entire categories (includes subcategories) All Except Products (Pro) – Exclude specific products from rule Specific Variations (Pro) – Target individual product variations Smart Condition Logic AND/OR logic for complex rules Multiple condition groups Rule priority ordering — drag & drop (Pro) Free vs Pro Free Version Includes One rule 10 conditions: product price, stock status, product tag, cart contains product, cart quantity, cart subtotal, cart total, user role, user login status, user country Disable, Customize Button, and Replace Button actions Product and category targeting AND/OR condition logic Pro Version Adds Multi-rules system Rule enable/disable toggles Drag & drop rule priority ordering 6 additional conditions: Product on Sale, Product Attribute, Cart Contains Category, Time, Date/Time, Day of Week Hide Price toggle — hide or replace the price with custom text and optional link (combinable with any action) Request Quote action with email notifications Redirect URLs for Customize Button action “All Except Products” targeting Product variation targeting Custom “not available” messages for Disable action Priority email support Upgrade to Pro → How It Works Step 1: Create a Rule Give your rule a descriptive name like “Disable for Guests” or “Wholesale Quote Request”. Step 2: Target Products (Apply to) Select which products the rule affects: all products, specific products, or product categories. Step 3: Set Conditions (When) Choose when the rule should apply: user role, cart total, login status, country, and more. Step 4: Choose Action (Then) Decide what happens to the Add to Cart button: hide it, customize text and colors, replace with custom HTML, or show a quote form (Pro). Step 5: Save & Test Enable the rule and test it on your store. Toggle it off anytime without deleting. Example Rules Example 1: Minimum Order Amount When: Cart total less than $50 What: All products Then: Customize button text to “Minimum $50 Required” Example 2: Members Only Products When: User is not logged in What: Category “Premium” Then: Replace button with “Login to Purchase” link Example 3: Country Restrictions When: User country is “Canada” or “Mexico” What: Specific products Then: Disable Add to Cart with message “Not available in your region” Example 4: Wholesale User Role When: User role is “Wholesale Customer” What: All products Then: Replace Add to Cart with a Request Quote form Theme Compatibility Works with all WooCommerce-compatible themes including Storefront, Astra, Divi, Flatsome, OceanWP, Avada, GeneratePress, Kadence, and more. Page Builder Compatibility Elementor, WPBakery, Beaver Builder, Gutenberg, Oxygen. Privacy Policy This plugin does not collect, store, or share any personal data. All rules and conditions are stored locally in your WordPress database. The Pro version’s Request Quote feature collects form submissions (name, email, message) which are sent to the store admin email. This data is not stored by the plugin or sent to external services.
Top keywords
- cart30×3.16%
- product22×2.32%
- products19×2.00%
- user17×1.79%
- button15×1.58%
- pro14×1.47%
- rule13×1.37%
- add12×1.26%
- add to cart11×1.16%
- conditions11×1.16%
- disable11×1.16%
- hide11×1.16%
Native B2B
Native B2B is a professional-grade Product Catalog and Request for Quote (RFQ) system for WordPress. Designed with a native-first, zero-bloat architecture, it provides a high-speed alternative for wholesale businesses and lead generation sites. Core Features Custom Product Management: Effortlessly manage wholesale products with tiered pricing and technical specifications. Professional RFQ System: High-performance AJAX-based inquiry form that integrates seamlessly into any theme. Advanced Anti-Spam Shield: Protect your inbox with Math Challenges, Akismet integration, and Honeypot fields. Global Notifications: Get instant alerts via Slack, Discord, Telegram, Feishu, Email, Bark, and NTFY. Data Automation: Automatically synchronize inquiry data to Google Sheets via Apps Script. Analytics Dashboard: Monitor leads and analyze inquiry peak hours with our unique Hotspot Analysis tool. Enterprise Ready: One-click CSV export and daily automated database maintenance. Usage Add Products: Navigate to ‘B2B Products’ -> ‘Add New’. Fill in the title, description, and tiered pricing in the provided meta boxes. Display Catalog: Use the shortcode [ezls_gallery columns="4"] on any page to display your product grid. Inquiry Button: Use [ezls_inquiry_btn] on custom pages to trigger the RFQ popup. Configuration: Visit ‘B2B Products’ -> ‘Settings’ to connect your notification channels and data integration credentials. Lead Management: View and process incoming leads under the ‘Inquiries’ menu. Use the ‘Hotspot Analysis’ to optimize your sales staffing. Google Sheets Integration This integration uses a secure Google Apps Script to send inquiry data to your Google Sheet in real-time. Part 1: Create the Google Sheet & Apps Script Create Google Sheet: Go to sheets.google.com, create a new spreadsheet, and name it (e.g., B2B Inquiries). Set Up Headers: In the first row, set up the following headers exactly as written (case-sensitive): Time, ID, Product, Name, Email, Tel, IM, Message, Link. Open Apps Script: In your spreadsheet, go to Extensions -> Apps Script. Paste Script Code: Delete any default code in the Code.gs file and paste the entire script below: // Copyright (c) 2024 EEZZ.NET. All rights reserved. // This script is provided for use with the “Native B2B” WordPress plugin. const API_PASSWORD = “YOUR_SECRET_PASSWORD”; const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); function doPost(e){try{if(!e||!e.postData||!e.postData.contents){throw new Error(“Invalid request: No data received.”)}const params=JSON.parse(e.postData.contents);if(params.AuthKey!==API_PASSWORD){return createJsonResponse({“status”:”error”,”message”:”Authentication failed.”})}const newRow=[params.Time||new Date(),params.ID||’N/A’,params.Product||’N/A’,params.Name||’N/A’,params.Email||’N/A’,params.Tel||’N/A’,params.IM||’N/A’,params.Message||’N/A’,params.Link||’N/A’];const lock=LockService.getScriptLock();lock.waitLock(30000);try{sheet.appendRow(newRow)}finally{lock.releaseLock()}return createJsonResponse({“status”:”success”})}catch(error){console.error(“Error processing request: “+error.toString());return createJsonResponse({“status”:”error”,”message”:”An internal error occurred: “+error.message})}} function createJsonResponse(data){return ContentService.createTextOutput(JSON.stringify(data)).setMimeType(ContentService.MimeType.JSON)} Set Password & Save: In the script, change "YOUR_SECRET_PASSWORD" to your own strong password and save the project. Part 2: Deploy and Configure Deploy as Web App: Click Deploy -> New deployment. Select type Web app. Set Access: Under “Who has access”, select Anyone. This is critical. Authorize & Copy URL: Click Deploy, authorize the script (you may need to click “Advanced” -> “Go to…”), and copy the generated Web app URL. Configure in WordPress: Go to B2B Products -> Settings. Paste the Web app URL and your password into the Google Sheets section and save changes. External Services This plugin connects to third-party services to provide notifications, data sync, and spam protection. No data is sent to these services unless you explicitly configure the corresponding credentials in the plugin settings. Akismet Anti-Spam Purpose: To check inquiry submissions for spam. Data Sent: When a user submits an inquiry, their IP address, user agent, referrer, name, email address, and message content are sent to the Akismet service. Links: Terms of Service, Privacy Policy Telegram Bot API Purpose: To send real-time notifications for new inquiries to your configured chat. Data Sent: When a new inquiry is received, details such as the product name, customer name, and email are sent via the Telegram Bot API. Links: Terms of Service, Privacy Policy Slack (Incoming Webhook) Purpose: To send real-time notifications for new inquiries to your Slack workspace. Data Sent: When a new inquiry is received, the product name, customer name, message preview, and a link to the product page are sent to the configured Slack webhook URL. Links: Privacy Policy Discord (Webhook) Purpose: To send real-time notifications for new inquiries to your Discord server. Data Sent: When a new inquiry is received, the product name, customer name, email, and a link to the product page are sent to the configured Discord webhook URL. Links: Privacy Policy Feishu / Lark (Webhook) Purpose: To send real-time notifications for new inquiries to your Feishu/Lark group. Data Sent: When a new inquiry is received, the inquiry ID, product name, customer name, email, and message text are sent to the configured Feishu webhook URL. If a Feishu signing secret is configured, a timestamp and HMAC signature are also included for request verification. Links: Terms of Service, Privacy Policy Bark Purpose: To send real-time push notifications for new inquiries to your mobile devices via your self-hosted or public Bark server. Data Sent: When a new inquiry is received, the inquiry ID and customer name are sent to the configured Bark server URL. Links: Project Repository & Documentation ntfy Purpose: To send real-time push notifications for new inquiries to your mobile devices via your self-hosted or public ntfy server. Data Sent: When a new inquiry is received, a notification message containing the customer name and product name is sent to the configured ntfy topic URL. Links: Terms of Service (ntfy.sh), Privacy Policy (ntfy.sh) Google Sheets (via Apps Script Webhook) Purpose: To automatically sync inquiry data to a Google Sheets spreadsheet for record-keeping and analysis. Data Sent: When a new inquiry is received, the inquiry code, product name, customer name, email, phone, IM platform, IM account, message, product link, and timestamp are sent to the configured Google Apps Script webhook URL. An API password (set by the site administrator) is included for authentication. Links: Google Privacy Policy