WP Manifestindependent plugin directory
manifest / ecommerce / product-title-standardizer

Product Title Standardizer

product title standardizer

by Your Name · github.com/mikohmick/product-title-standardizer · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/mikohmick/product-title-standardizer/archive/refs/heads/claude%2Fwordpress-product-standardizer-lTcRh.zip

A WordPress plugin that standardizes WooCommerce product titles using OpenAI's GPT models. Perfect for e-commerce stores that need consistent, professional product naming across their catalog.

Features

  • AI-Powered Standardization: Uses OpenAI's GPT models to intelligently standardize product titles
  • Batch Processing: Process entire product categories at once
  • Real-time Progress Tracking: Monitor processing with live progress bars and statistics
  • Flexible Configuration: Customize AI behavior with adjustable temperature, tokens, and system prompts
  • Multiple Model Support: Choose from GPT-4, GPT-4 Turbo, GPT-4o, GPT-4o Mini, or GPT-3.5 Turbo
  • Detailed Results: See exactly what changed and why for each product
  • Export Functionality: Export results to CSV for record-keeping
  • Safe Processing: Products are updated only when needed, with full logging

Requirements

  • WordPress 5.8 or higher
  • WooCommerce 5.0 or higher
  • PHP 7.4 or higher
  • OpenAI API key (Get one here)

Installation

Manual Installation

  1. Download the plugin files
  2. Upload the product-title-standardizer folder to /wp-content/plugins/
  3. Activate the plugin through the 'Plugins' menu in WordPress
  4. Navigate to Title Standardizer > Settings to configure your OpenAI API key

From ZIP File

  1. Go to Plugins > Add New in WordPress admin
  2. Click Upload Plugin
  3. Choose the product-title-standardizer.zip file
  4. Click Install Now
  5. Activate the plugin

Configuration

1. Configure OpenAI Settings

Navigate to Title Standardizer > Settings and configure:

  • OpenAI API Key: Your API key from OpenAI
  • Model: Select the AI model (GPT-4 Turbo recommended)
  • Temperature: Controls randomness (0.3 recommended for consistency)
  • Max Tokens: Maximum response length (300 is usually sufficient)
  • System Prompt: Instructions for how to standardize titles

2. Default System Prompt

The plugin comes with a default prompt for iPhone products:

You are a product title standardization expert for an e-commerce store.

For the "Lipa pole pole iPhones" category, titles must follow this exact format:
Brand Model Storage Network – EX-UK/USA (Lipa pole pole)

Example: Apple iPhone 14 Pro Max 128GB 5G – EX-UK/USA (Lipa pole pole)

You can customize this prompt for your specific needs.

3. Test Your Connection

Use the Test Connection button on the settings page to verify your API key is working.

Usage

Processing Products

  1. Go to Title Standardizer > Process Titles
  2. Select a product category from the dropdown
  3. Click Run Standardization
  4. Monitor the progress in real-time
  5. Review the results table when complete

Understanding Results

Each product will have one of three statuses:

  • Updated: Title was changed to match the standard format
  • Skipped: Title already matches the standard format
  • Error: Something went wrong (check reasoning for details)

Exporting Results

Click Export Results (CSV) to download a spreadsheet with:

  • Product ID
  • Old Title
  • New Title
  • Status
  • Reasoning

Customization

Custom Title Formats

Edit the System Prompt in settings to define your own title format:

You are a product title standardization expert.

For [Category Name], titles must follow this format:
[Your Format Rules]

Return ONLY a JSON object:
{
  "current_title": "the existing title",
  "needs_update": true/false,
  "new_title": "the standardized title",
  "reasoning": "brief explanation"
}

Modifying AI Behavior

Adjust these settings to control how the AI processes titles:

  • Temperature (0-1): Lower = more consistent, Higher = more creative
  • Max Tokens: Increase for longer, more detailed responses
  • Model: Better models = better results (but higher cost)

Cost Estimation

Processing costs depend on your chosen model:

Model Input (per 1M tokens) Output (per 1M tokens) Est. per Product
GPT-4o Mini $0.15 $0.60 ~$0.0004
GPT-3.5 Turbo $0.50 $1.50 ~$0.001
GPT-4o $5.00 $15.00 ~$0.01
GPT-4 Turbo $10.00 $30.00 ~$0.02
GPT-4 $30.00 $60.00 ~$0.06

Estimates based on average product with ~500 input tokens and ~150 output tokens

Troubleshooting

Plugin Won't Activate

Solution: Ensure WooCommerce is installed and activated first.

API Key Not Working

Solutions:

  • Verify the key is correct (no extra spaces)
  • Check your OpenAI account has credits
  • Use the Test Connection feature
  • Check your server can make outbound HTTPS requests

Processing Stops or Fails

Solutions:

  • Check WordPress debug.log for errors
  • Verify your server's max_execution_time is sufficient
  • Ensure stable internet connection
  • Try processing smaller batches
  • Check OpenAI API status

Products Not Updating

Solutions:

  • Check if titles already match the format (will be skipped)
  • Review the reasoning column in results
  • Verify system prompt is clear and specific
  • Check product permissions

Security

The plugin follows WordPress security best practices:

  • ✓ Capability checks on all admin pages
  • ✓ Nonce verification on all AJAX requests
  • ✓ Input sanitization and validation
  • ✓ Secure API key storage
  • ✓ No direct file access allowed

Development

File Structure

product-title-standardizer/
├── product-title-standardizer.php  # Main plugin file
├── includes/
│   ├── admin-settings.php         # Settings page
│   ├── admin-processor.php        # Processing interface
│   ├── ajax-handler.php           # AJAX endpoints
│   └── openai-handler.php         # OpenAI API calls
├── assets/
│   ├── css/
│   │   └── admin-style.css        # Admin styles
│   └── js/
│       └── processor.js           # Processing logic
└── README.md                      # Documentation

Hooks and Filters

Available Filters:

// Modify product data before sending to OpenAI
apply_filters('pts_product_data', $product_data, $product_id);

// Modify the user prompt
apply_filters('pts_user_prompt', $prompt, $product_data);

// Modify OpenAI request body
apply_filters('pts_openai_request_body', $body, $product_data);

// Modify parsed response
apply_filters('pts_openai_response', $result, $product_data);

Available Actions:

// Before processing starts
do_action('pts_before_processing', $category_id);

// After each product is processed
do_action('pts_product_processed', $product_id, $result);

// After processing completes
do_action('pts_after_processing', $results);

Debugging

Enable WordPress debug mode in wp-config.php:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

Check /wp-content/debug.log for detailed error messages.

Changelog

Version 1.0.0

  • Initial release
  • OpenAI integration with multiple model support
  • Batch processing by category
  • Real-time progress tracking
  • Results export to CSV
  • Comprehensive settings page

Support

For issues, questions, or feature requests:

  1. Check the Troubleshooting section
  2. Review the WordPress debug log
  3. Create an issue on the plugin repository

License

GPL v2 or later - https://www.gnu.org/licenses/gpl-2.0.html

Credits

Developed with ❤️ for WooCommerce store owners who value consistency and professionalism.

Disclaimer

This plugin uses the OpenAI API, which incurs costs based on usage. Monitor your usage and costs through your OpenAI dashboard. The plugin developers are not responsible for API charges incurred.