Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/kailanwyatt/product-collections/archive/refs/heads/main.zipA WooCommerce extension that replicates Shopify Collections functionality, allowing you to create manual or smart (rule-based) product collections with Shopify-style URLs.
Description
Product Collections brings Shopify's powerful Collections feature to WooCommerce. Create curated product collections using manual selection or smart rules based on product attributes, categories, tags, price, SKU, and more. Collections are displayed with clean URLs like /collections/sale and integrate seamlessly with WooCommerce's product display system.
Perfect for stores that want to organize products into dynamic collections, create seasonal sales pages, or showcase curated product selections.
Features
Collection Types
- Smart Collections: Automatically include products based on rules (categories, tags, price, SKU, stock status, featured products, etc.)
- Manual Collections: Curate products manually using an intuitive product picker
Rule-Based Collections
Create smart collections with flexible rules:
- Product matching: Include/exclude specific products
- Category matching: Filter by product categories
- Tag matching: Filter by product tags
- Price filters: Set minimum and maximum price ranges
- SKU matching: Filter by SKU patterns
- Stock status: Filter by in-stock/out-of-stock status
- Featured products: Include only featured products
- On-sale products: Include only products on sale
- Match logic: Use "all" (AND) or "any" (OR) matching conditions
URL Structure
- Shopify-style URLs:
/collections/{slug} - Configurable base slug (default:
collections) - Optional
/collections/allcollection (shows all products)
Frontend Features
- Block Template Support: Collections are editable in the WordPress Site Editor
- WooCommerce Integration: Uses WooCommerce's product loop and templates
- Product Sorting: Customer-facing sorting options (price, popularity, date, etc.)
- Theme Compatibility: Works with any WooCommerce-compatible theme
- SEO Compatible: Works with popular SEO plugins (Yoast, Rank Math, etc.)
Admin Features
- Streamlined Interface: Simple collection creation (title + rules + publish)
- Visual Rules Builder: Easy-to-use interface for creating smart collection rules
- Product Picker: Advanced modal for manual product selection with search and filters
- Collection Management: Full CRUD operations for collections
- Settings Integration: Configured under WooCommerce > Settings > Products > Collections
Developer Features
- Object Cache: Efficient caching system for collection products
- Extensible: Hooks and filters for customization
- Shortcodes: Display collections anywhere with
[wc_collections]and[wc_collection] - Template Override System: Override templates via theme
- WordPress Coding Standards: Follows WordPress and WooCommerce best practices
Requirements
- WordPress 5.8 or higher
- WooCommerce 5.0 or higher
- PHP 7.4 or higher
Installation
From WordPress Admin
- Upload the plugin files to
/wp-content/plugins/product-collections/ - Activate the plugin through the 'Plugins' screen in WordPress
- Ensure WooCommerce is installed and active
- Configure settings under WooCommerce > Settings > Products > Collections
Manual Installation
- Download or clone the plugin to your WordPress plugins directory
- Navigate to
wp-content/plugins/product-collections/ - Run
npm installto install dependencies - Run
npm run buildto build assets (if modifying) - Activate the plugin in WordPress admin
Usage
Creating a Collection
- Navigate to Products > Collections in WordPress admin
- Click "Add New Collection"
- Enter a collection title
- Choose collection type:
- Smart Collection: Set up rules to automatically include products
- Manual Collection: Use the product picker to manually select products
- Configure rules (for smart collections) or select products (for manual collections)
- Publish the collection
Configuring Settings
Go to WooCommerce > Settings > Products > Collections to configure:
- Base Slug: Change the URL structure (default:
collections) - Enable /all Collection: Show all products at
/collections/all - Enable Customer Sorting: Display sorting dropdown on collection pages
- Flush Rewrite Rules: Clear rewrite rules cache if URLs aren't working
Shortcodes
Display Collections Grid
[wc_collections per_page="12"]
Displays a grid of all published collections.
Parameters:
per_page(optional): Number of collections to display (default: 12)
Display Collection Products
[wc_collection slug="sale"]
Displays products from a specific collection.
Parameters:
slug(required): The collection slug (post_name)
Template Customization
Collections use WooCommerce's product loop system. You can override templates by placing them in your theme:
woocommerce/wc-collections/single-collection.php- Single collection templatewoocommerce/wc-collections/archive-collections.php- Collections archive template
For block themes, collections are editable in the Site Editor under Templates > WooCommerce.
Development
Building Assets
npm install
npm run build
Code Structure
product-collections/
├── includes/
│ ├── admin/ # Admin interface classes
│ ├── blocks/ # Block template system
│ ├── frontend/ # Frontend display classes
│ └── *.php # Core plugin classes
├── assets/
│ ├── css/ # Stylesheets
│ └── js/ # JavaScript files
├── templates/ # PHP templates
└── languages/ # Translation files
Hooks and Filters
Actions
wc_product_collections_loaded- Fired when plugin is loadedbefore_wc_product_collections_init- Before plugin initializationwc_product_collections_init- After plugin initialization
Filters
wc_product_collections_base_slug- Filter the base slugwc_product_collections_template_path- Filter template pathwc_product_collections_collection_products- Filter collection products query
Helper Functions
wc_product_collections()- Get main plugin instancewc_product_collections_get_collection_by_slug( $slug )- Get collection by slugwc_product_collections_get_collection_products( $collection_id )- Get collection product IDswc_product_collections_get_collection_permalink( $collection )- Get collection URLwc_product_collections_get_base_slug()- Get configured base slug
Support
For issues, feature requests, or contributions, please visit the plugin repository.
Changelog
1.0.0
- Initial release
- Smart and manual collection types
- Rule-based product matching
- Shopify-style URLs
- Block template support
- Shortcodes
- Admin interface
License
GPLv2 or later
Credits
Developed by SuitePlugins