Skip to main content

WooCommerce integration

Overview​

WPEnhanced Ajax Filter Blocks integrates with WooCommerce through the same three Gutenberg blocks used for posts. Point an Archive Loop at the Product post type, then add Filter Posts Item blocks for WooCommerce-specific sources.

No separate WooCommerce extension is required beyond having WooCommerce installed and active.

Supported product filters​

Filter sourceUse for
Product categoryShop by category (product_cat)
Product tagMarketing tags (product_tag)
Product attributeColor, size, material, and custom attributes
PriceMin/max range slider or inputs
Stock statusIn stock, out of stock, on backorder
WeightShipping weight ranges (when relevant)
SearchKeyword search within the product loop

Configure each source in a Filter Posts Item block inside Filter Posts.

Basic WooCommerce setup​

  1. Archive Loop

    • Post type: Product
    • Pagination, grid columns, and template as needed
    • Optional: hide out-of-stock products in loop query settings
  2. Filter Posts

    • Linked to the product Archive Loop on the same page
    • URL sync enabled if you want shareable shop URLs
  3. Filter Posts Item blocks

    • One item per facet (category, attribute, price, etc.)

See Filter products by category for a full walkthrough.

Product attributes and swatches​

WooCommerce global attributes (e.g. pa_color) appear as filter sources when you choose Product attribute in a filter item.

For visual attribute selection:

  • Set control type to Radio or Checkbox
  • Enable Swatches in the filter item design settings
  • Map colors or images to attribute terms

See Filter swatches for swatch configuration.

Price, sale, and variable products​

  • Simple products: Price filter uses the displayed price.
  • Sale products: Effective sale price is typically used for range matching—verify on staging.
  • Variable products: Price may span a min–max across variations; test your catalog's most common variable products.

Stock and catalog visibility​

Use Stock status filters to let customers show only in-stock items. Align Archive Loop query settings with filter behavior so out-of-stock products are hidden consistently in both the initial load and AJAX responses.

WooCommerce templates and block themes​

WPEnhanced Ajax Filter Blocks works in the block editor on pages and templates. You can:

  • Build a custom Shop page and point WooCommerce Shop page setting to it
  • Use Site Editor templates with Archive Loop + Filter Posts for archive-style layouts

Ensure only one primary product loop on a page targets the same filter group unless you intentionally configure multiple independent pairs.

Performance on large catalogs​

Stores with thousands of SKUs may see slower option counts on taxonomy filters. WPEnhanced Ajax Filter Blocks Pro includes Catalog Index for faster counts—see Catalog Index.

What's next​