WP Manifestindependent plugin directory
manifest / ecommerce / product-collections

Product Collections

Replicate Shopify Collections functionality in WooCommerce with Shopify-style URLs (/collections, /collections/{slug}). Supports manual and smart (rule-based) collections.

★ 0stars

Install

Download source zip No release zip yet

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.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

A 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/all collection (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

  1. Upload the plugin files to /wp-content/plugins/product-collections/
  2. Activate the plugin through the 'Plugins' screen in WordPress
  3. Ensure WooCommerce is installed and active
  4. Configure settings under WooCommerce > Settings > Products > Collections

Manual Installation

  1. Download or clone the plugin to your WordPress plugins directory
  2. Navigate to wp-content/plugins/product-collections/
  3. Run npm install to install dependencies
  4. Run npm run build to build assets (if modifying)
  5. Activate the plugin in WordPress admin

Usage

Creating a Collection

  1. Navigate to Products > Collections in WordPress admin
  2. Click "Add New Collection"
  3. Enter a collection title
  4. Choose collection type:
    • Smart Collection: Set up rules to automatically include products
    • Manual Collection: Use the product picker to manually select products
  5. Configure rules (for smart collections) or select products (for manual collections)
  6. 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 template
  • woocommerce/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 loaded
  • before_wc_product_collections_init - Before plugin initialization
  • wc_product_collections_init - After plugin initialization

Filters

  • wc_product_collections_base_slug - Filter the base slug
  • wc_product_collections_template_path - Filter template path
  • wc_product_collections_collection_products - Filter collection products query

Helper Functions

  • wc_product_collections() - Get main plugin instance
  • wc_product_collections_get_collection_by_slug( $slug ) - Get collection by slug
  • wc_product_collections_get_collection_products( $collection_id ) - Get collection product IDs
  • wc_product_collections_get_collection_permalink( $collection ) - Get collection URL
  • wc_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