πŸ“– Documentation

Storzen Product Tag Assistant
for WooCommerce

Add WooCommerce product tags automatically. Get AI suggestions for tags, categories and attributes, then apply them one product at a time, in bulk, or on save.

● Version 1.0.2● WooCommerce 8.0+● WordPress 6.7+● PHP 8.1+● HPOS Compatible● GPL-2.0 Free
01 β€” Overview

What is Storzen Product Tag Assistant?

Storzen Product Tag Assistant adds product tags in WooCommerce automatically. In Rules mode (the default, free, no API key) you define simple rules and the plugin tags products on your own server. In optional AI mode it asks OpenAI, Anthropic (Claude), Google Gemini or DeepSeek for tags, categories and attributes, and lets you review them before anything is saved.

Scripts and styles load only on the product edit screen and on the plugin's own settings tab. Nothing is added to your storefront.

🧩Rules ModeFree and private. Tag by keyword, category or attribute. No API key, no data leaves your site.
πŸ“¦Bulk TaggingTwo bulk actions on the products list: preview suggestions, or tag and apply in one go.
⚑Auto-tag on SaveOptionally tag a product every time it is published or updated.
πŸ”’Secure by DesignNonces, per-product permission checks, escaped output and HPOS compatibility.
βœ…
You stay in control: in the product panel nothing is saved until you click Apply Selected.
02 β€” Requirements

Requirements

RequirementMinimumTested up to
WordPress6.77.1
WooCommerce8.09.9
PHP8.1β€”
AI provider API keyOptional, AI mode only. Your own OpenAI, Anthropic, Google or DeepSeek key; the provider bills you directly
⚠️
WooCommerce must be installed and active. The plugin lists it as a required plugin and shows an admin notice instead of loading if it is missing.
03 β€” Getting Started

Installation

1
Upload the plugin
Go to Plugins β†’ Add New β†’ Upload Plugin, choose {S}.zip and click Install Now. You can also upload the folder to /wp-content/plugins/.
2
Activate
Click Activate. Activation creates the log table and default settings, and contacts no external server.
3
Open settings
Go to WooCommerce β†’ Settings β†’ Tag Assistant. New installs start in Rules mode.
4
Add a rule
Add one or more tagging rules (see Rules Mode). Or switch to AI mode, pick a provider, paste your key and click Test API Connection.
5
Tag a product
Open any product and click Preview Matching Tags (Rules) or Get AI Suggestions (AI) in the Tag Assistant panel.
04 β€” Reference

File Structure

storzen-product-tag-assistant-for-woocommerce/ β”œβ”€β”€ storzen-product-tag-assistant-for-woocommerce.php ← Main file (headers, constants, HPOS declaration) β”œβ”€β”€ uninstall.php ← Removes all data on delete β”œβ”€β”€ readme.txt Β· license.txt β”œβ”€β”€ admin/ β”‚ β”œβ”€β”€ Admin.php ← Metabox, bulk actions, Untagged view, assets β”‚ β”œβ”€β”€ Settings_Page.php ← WooCommerce settings tab β”‚ β”œβ”€β”€ views/metabox.php β”‚ └── css/ admin.css Β· js/ metabox.js Β· settings.js Β· catalog.js β”œβ”€β”€ includes/ β”‚ β”œβ”€β”€ Core/ Plugin Β· Activator Β· Deactivator Β· Requirements β”‚ β”‚ Tagger_Service Β· Rules_Engine Β· Background_Tagger Β· New_Product_Tagger Β· Logger Β· Privacy β”‚ β”œβ”€β”€ Api/ Provider_Registry Β· OpenAI/Anthropic/Gemini/DeepSeek_Provider Β· Rest_Controller β”‚ └── Admin/ ← autoloader proxies to /admin/ β”œβ”€β”€ languages/storzen-product-tag-assistant-for-woocommerce.pot └── assets/icon.svg
05 β€” Features

Rules Mode

Rules mode is free, needs no API key and sends no data anywhere. Add rules under WooCommerce β†’ Settings β†’ Tag Assistant β†’ Tagging Rules. A product that matches a rule gets that rule's tags.

Rule typeMatches when…
If text containsThe title, the description, or either contains one or more keywords (comma-separated), anywhere in the text or as a whole word.
If category isThe product is in that category, including its sub-categories.
If attribute isThe product has that attribute, optionally with a given value.

You can also pick attribute names (for example Material) to turn their values into tags automatically. Rules only add tags; the tags a product already has are kept. Rules are evaluated on your server only when you preview, save a product with auto-tag on, or run a bulk or catalog job.

06 β€” Features

Product Panel

Every product edit screen has a Tag Assistant panel in the sidebar. Click Get AI Suggestions to get tags, categories and attributes as clickable chips. Selected chips are highlighted; click a chip to deselect it, then click Apply Selected.

What happens when you apply

SuggestionBehavior
TagsReplace the product's current tags. Missing tags are created.
CategoriesAdded to the product's existing categories. Nothing is removed.
AttributesAdded as visible product attributes (not used for variations).
πŸ’‘
The panel shows Last tagged with the time of the previous run. Without an API key it shows a link to the settings tab instead.
07 β€” Features

Bulk Tagging

Select products in Products β†’ All Products, pick a bulk action and click Apply.

Bulk actionResult
Tag Assistant: Suggest tags (preview)Analyses products and logs the suggestions without changing them.
Tag Assistant: Auto-tag & applyAnalyses products and applies the suggestions straight away.

A notice reports how many products succeeded and failed. The plugin pauses one second between products to avoid API rate limits, so large batches take longer. Products you are not allowed to edit are skipped and counted as failed.

⚠️
Applying in bulk replaces existing tags with no review step. Try a few products first.
08 β€” Features

Catalog Tagging

Tag a whole store without keeping a browser tab open. Go to WooCommerce β†’ Settings β†’ Tag Assistant β†’ Catalog Tagging and choose a job:

ButtonResult
Tag untagged productsProcesses only products that have no tags.
Re-tag all productsProcesses every product. Existing tags are replaced, so a confirmation is shown first.

The job runs in small batches through Action Scheduler, which is included with WooCommerce, so large catalogs do not hit PHP time limits. A progress bar shows processed of total with tagged and failed counts, and you can Pause, Resume or Cancel at any time.

Built-in safety

  • The job stops by itself after 5 failures in a row (for example a wrong key or no API credit). Fix the problem, then click Resume.
  • If OpenAI rate-limits a request (HTTP 429), the plugin waits 60 seconds and retries the same product.
  • Products the starting user cannot edit are skipped and counted as failed.
  • Only one job can run at a time. Deactivating the plugin pauses a running job.

On Products β†’ All Products, the Untagged link above the table lists products that have no tags.

⚠️
Every product in the job is sent to OpenAI and uses your API credit. Try a few products first.
09 β€” Features

Auto-tag on Save

Turn on Auto-tag on Save to call the AI each time a product is published or updated. It is off by default. If you already clicked Apply Selected in the panel, the next save skips the automatic run so the product is not tagged twice.

10 β€” Features

AI Providers

Switch to AI mode to use your own account with one provider. Each provider has a fast, low-cost default model and a higher-accuracy model.

ProviderModels
OpenAIGPT-4o Mini (default), GPT-4o
Anthropic (Claude)Claude Haiku 4.5 (default), Claude Sonnet 5.5
Google GeminiGemini 3.1 Flash-Lite (default), Gemini 3.5 Flash
DeepSeekDeepSeek Flash (default), DeepSeek V4 Pro

Provider model names change over time. Developers can update them without a plugin release through the aptwc_provider_models filter. DeepSeek's privacy policy says data is processed and stored in China, so review it before choosing that provider.

Developers can add more providers with the aptwc_ai_providers filter by implementing Provider_Interface. Applied AI tags replace a product's current tags; categories and attributes are added.

11 β€” Features

New & Imported Products

Products created outside the product editor never trigger Auto-tag on save. Switch on Tag new products from any source (WooCommerce β†’ Settings β†’ Tag Assistant β†’ Tagging Behaviour) and the plugin tags them for you.

  • Covers the WooCommerce CSV importer, the REST API, WP All Import, dropshipping tools and any other plugin that creates products.
  • Each new product is queued with Action Scheduler and tagged about 30 seconds later, so the import stays fast and the product's categories and attributes are already saved.
  • Works in Rules and AI mode. It is off by default.
  • Skip new products that already have tags is on by default, so tags that come with your import file are never replaced.

Safeguards

  • If the AI provider rate-limits a request, it is retried up to 5 times with a growing delay.
  • After 10 API failures in a row (for example a wrong key or no credit), tagging of new products pauses for 15 minutes instead of retrying thousands of times.
  • Products already tagged by the plugin (for example by a catalog job) are skipped.
πŸ’‘
Products created in the product editor are covered by Auto-tag on save. Developers can skip products with the aptwc_should_tag_new_product filter.
12 β€” Reference

All Settings

Found under WooCommerce β†’ Settings β†’ Tag Assistant.

Option keySettingDefault
aptwc_modeTagging mode (rules or ai)rules; ai if an API key already existed
aptwc_rulesTagging rules (array)empty
aptwc_auto_tag_newTag new products from any sourceno
aptwc_auto_tag_new_skip_taggedSkip new products that already have tagsyes
aptwc_rules_attr_namesAttributes to turn into tagsempty
aptwc_api_providerAI provideropenai
aptwc_api_key / aptwc_modelOpenAI key and modelempty / gpt-4o-mini
aptwc_key_anthropic / aptwc_model_anthropicAnthropic key and modelempty / claude-haiku-4-5-20251001
aptwc_key_gemini / aptwc_model_geminiGemini key and modelempty / gemini-3.1-flash-lite
aptwc_key_deepseek / aptwc_model_deepseekDeepSeek key and modelempty / deepseek-flash
aptwc_auto_tagAuto-tag on Saveno
aptwc_max_tagsMax tags per product (1–15)5
aptwc_max_catsMax categories per product (1–5)2
aptwc_prompt_templateCustom system prompt (advanced)empty
πŸ’‘
A custom prompt must tell the model to return valid JSON with tags, categories and attributes keys. Leave it blank to use the built-in prompt.
13 β€” Developer

REST API

Namespace: /wp-json/storzen-product-tag-assistant-for-woocommerce/v1. Routes need a logged-in user with a valid REST nonce. All use POST except GET /catalog and GET /products/{id}/suggest.

RoutePermission
/products/{id}/suggestCan edit that specific product
/products/{id}/applyCan edit that specific product
/bulkmanage_woocommerce, plus edit rights per product
/test-connectionmanage_woocommerce
GET /catalogmanage_woocommerce β€” current job status
/catalog/startmanage_woocommerce β€” body: mode = untagged | all
/catalog/{pause|resume|cancel}manage_woocommerce
14 β€” Developer

Hooks & Data

Hooks

HookPurpose
aptwc_settings_fieldsFilter the settings fields array
aptwc_prompt_partsFilter the product data parts sent in the prompt
aptwc_ai_messagesFilter the final message array sent to OpenAI
aptwc_suggestions_appliedAction fired after suggestions are applied. Args: product ID, suggestions, source
aptwc_rules_suggestionsFilter the tags produced by Rules mode
aptwc_should_tag_new_productReturn false to skip a new product. Args: bool, product ID
aptwc_new_product_delaySeconds to wait before a new product is tagged (default 30)
aptwc_max_rulesFilter the maximum number of rules (default 100)
aptwc_ai_providersRegister or remove AI providers
aptwc_provider_modelsFilter a provider's model list
add_action( 'aptwc_suggestions_applied', function ( $product_id, $suggestions, $source ) { // $source is 'manual', 'bulk', 'catalog', 'auto' or 'import'. }, 10, 3 );

Stored data

  • Post meta: _aptwc_last_tagged, _aptwc_last_tokens
  • Options: the settings above plus aptwc_version, aptwc_db_version and aptwc_catalog_job (job state; the API key, custom prompt and job state are not autoloaded)
  • Log table {prefix}aptwc_log: product, source, status, applied tags/categories/attributes, tokens used, time
  • Uninstalling removes all of the above. Tags and categories already on products are kept.
15 β€” Help

Privacy & OpenAI

In Rules mode the plugin contacts no external service. In AI mode it sends data only to the one provider you chose (api.openai.com, api.anthropic.com, generativelanguage.googleapis.com or api.deepseek.com), and only when you click Get AI Suggestions or Test API Connection, run a bulk or catalog job, or enable auto-tagging. Nothing is sent on activation.

Data sent: product title, short description, an excerpt of the description, SKU and existing category names. No customer, order or personal data is sent. See the terms and privacy policies of OpenAI, Anthropic and Google and DeepSeek.

16 β€” Help

Frequently Asked Questions

How do I tag imported products automatically?
Switch on Tag new products from any source in the settings. Products created by the CSV importer, the REST API or other plugins are queued and tagged in the background. Tags that come with your import file are kept by default.
Can I tag my whole catalog?
Yes. Use Catalog Tagging on the settings tab. It runs in the background, shows progress, and can be paused, resumed or cancelled.
Do I need an API key?
No. Rules mode is free and needs no key. A key is only needed for the optional AI mode, where you use your own OpenAI, Anthropic, Google or DeepSeek account and the provider bills you directly.
Will it overwrite my existing tags?
Rules mode only adds tags and keeps existing ones. In AI mode, applied suggestions replace the product's current tags and categories are only added. In the panel you can deselect anything first; auto-tag and bulk apply have no review step.
Does it work with variable, grouped and external products?
Yes, it works with all product types.
Will it slow down my store?
No storefront scripts or styles are added. Assets load only on the product edit screen and the settings tab, and AI requests run only when you trigger them or when auto-tagging is on.
Where are the logs?
Errors and API issues go to WooCommerce β†’ Status β†’ Logs under the plugin's source name. Each tagging run is also recorded in the plugin log table.
Is it HPOS compatible?
Yes. The plugin declares compatibility with High-Performance Order Storage.
17 β€” Help

Changelog

1.0.2Latest
  • Tag new products from any source: CSV importer, REST API, WP All Import and other plugins, in the background
  • Skip products that already have tags (default); rate-limit retries and a failure circuit breaker
  • New filters: aptwc_should_tag_new_product and aptwc_new_product_delay
1.0.1
  • Rules mode: free tagging by keyword, category or attribute, no API key (default for new installs)
  • AI providers: OpenAI, Anthropic (Claude), Google Gemini and DeepSeek
  • Catalog Tagging: background job with progress bar, pause, resume and cancel
  • "Untagged" view on the products list
  • Job stops after repeated errors and retries after rate limits
  • API key, custom prompt and job state no longer autoloaded
  • Stricter nonce handling on settings save; removed unneeded rewrite flush
1.0.0Initial release
  • AI tag, category and attribute suggestions in the product panel
  • Bulk preview and bulk apply actions
  • Optional auto-tag on save
  • Settings tab with model, limits and custom prompt
  • Activity log table and WooCommerce log integration
  • HPOS compatible, GDPR privacy hooks, translation-ready