BACK TO DIRECTORY

Keyword-Based Bulk Category Assignment for WooCommerce

by fradigital

0.0
(0 ratings)

Keyword-Based Bulk Category Assignment for WooCommerce reduces repetitive category work after product imports or catalog updates. Create rules once, select products in the WooCommerce Products list, review the exact planned assignments, and apply them only after confirmation.

The plugin adds categories to a product. It does not remove unrelated categories that are already assigned.

Main features

  • Create separate include and exclude rules for every WooCommerce product category.
  • Use simple terms with OR logic.
  • Combine multiple required terms in an AND group.
  • Search product titles, short descriptions, full descriptions, SKUs, and attributes.
  • Keep the product title as the backward-compatible default search field after an upgrade.
  • Preview every planned category assignment before products are changed.
  • See which term or AND group caused a match.
  • Undo the most recently applied run for the current administrator.
  • Filter the rules table by category name or show configured categories only.
  • Save rules from controls directly above or below the rules table.
  • Export and import rules as compact, legacy-compatible JSON.
  • Preserve rules created with version 1.0 and its established comma / "AND" syntax.

Rule logic

Simple terms use OR

Enter separate terms as individual chips. A category matches when at least one Contains chip matches the selected product fields.

Example:

shoes, sneakers, boots

This means shoes OR sneakers OR boots.

AND groups require every term

Choose + AND group, enter at least two comma-separated terms, and press Enter.

Example input in the AND-group editor:

red, leather

The plugin stores this as:

red "AND" leather

Both terms must occur in the searchable product content. Simple terms and AND groups can be combined in the same rule. For example, shoes, red "AND" leather means shoes OR (red AND leather).

Exclusions take priority

Rules in Does not contain use the same chip and AND-group logic. If any exclusion chip or exclusion AND group matches, the category is skipped even if a Contains rule matches.

Matching details

  • Matching is case-insensitive.
  • HTML markup is ignored.
  • Repeated whitespace is normalized.
  • German umlauts are normalized so, for example, Müller also matches mueller.
  • Terms are substring matches; choose specific terms to avoid broad unintended matches.

How to use the plugin

  1. Go to WooCommerce > Category Auto Rules.
  2. Select the product fields that the rules should search. Existing installations default to Title.
  3. Find the desired category. The category hierarchy and term ID are displayed for clarity.
  4. Add one or more terms under Contains. Press Enter or leave the input to accept the text.
  5. Add optional exclusions under Does not contain.
  6. Use + AND group when multiple terms must occur together.
  7. Save with the button above or below the table.
  8. Go to Products, select the products to evaluate, and choose Apply Category Auto Rules (Preview first) from Bulk actions.
  9. Review the planned assignments and the matching reasons.
  10. Confirm the preview to apply new categories. Use Undo last run in the success notice if the result needs to be reverted.

Import and export

Export downloads all category rules as JSON. The exported structure intentionally keeps the option format used by earlier releases, so it can also be read by version 1.0.

Import replaces the current category rules only. Before replacement, version 1.2.4 stores a backup of the previous rules. The Restore pre-import backup action can swap back to that rule set. The global product-field selection is not overwritten. Imports are restricted to valid JSON files up to 2 MB.

Category rules are keyed by WooCommerce term ID. When rules are moved between different stores, corresponding categories should use the same term IDs. Review the imported rows before applying rules to products.

Backward compatibility

Version 1.2.4 continues to use the original keywbuca_category_rules WordPress option and the original rule keys contains and not_contains. Existing rules are available immediately after the update; no destructive migration or activation cleanup runs.

The original syntax remains valid:

  • commas separate OR blocks;
  • the literal "AND" joins required terms inside one block;
  • title-only matching remains the default until an administrator enables more fields.

As a precaution for any production update, export the existing rules and create a normal site/database backup before installing a new plugin version. After updating, open the rules screen, confirm the stored rules, save once, and test a small product selection through the preview.

Privacy

The plugin does not contact external services, create public-facing cookies, or transmit product data. Rules, preview data, and undo data remain in the WordPress installation.

License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.

Screenshots

Plugin Details

Active Installs
0
Total Downloads
534
Version
1.2.4
Requires WP
6.0
Requires PHP
7.4
Tested Up To
7.1
Added
2025-07-28
Last Updated
2026-08-21 4:40pm GMT

Ratings

5
0
4
0
3
0
2
0
1
0