WooCommerce Simple Customizations
A modular WooCommerce plugin to add simple customizations, featuring a React-based settings UI.
Requirements
- WordPress 6.0+
- WooCommerce installed and active
- PHP 7.4+
Features
Cart Limits
Limit the purchase capability based on product categories, tags, or the entire cart.
- Rule Type: Select between "Global" (All Products), "Category", or "Tag".
- Minimum Quantity: Enforce a minimum quantity of items from the selected term in the cart.
- Validation: Displays an error message on the Cart page if limits are not met.
Installation
- Download the latest
.ziprelease from the GitHub Releases page. - Go to your WordPress Admin.
- Navigate to Plugins > Add New > Upload Plugin.
- Upload the zip file and click Install Now.
- Activate the plugin.
Configuration
- Go to WooCommerce > Settings > Simple Customizations.
- Toggle Enable Cart Limit.
- Select your criteria (Category/Tag) and the specific term.
- Set the Minimum Quantity.
- Click Save Changes.
Development
Prerequisites
- Node.js (v18+)
- Composer
- WordPress Environment
Setup
- Clone the repository to your
wp-content/plugins/directory. - Install dependencies:
npm install
composer install
- Build the assets:
npm run build
- Start development mode (watch for changes):
npm start
Release
This repository uses GitHub Actions to automatically build and release the plugin.
- Draft a new Release on GitHub.
- Create a new tag (e.g.,
v1.0.1). - Publish. The action will build the plugin and attach a
.zipfile to the release.