WooCommerce AI SEO Meta Description Generator — Automate at Scale (2026)
Auto-generate WooCommerce AI SEO meta descriptions for every product using Claude or OpenAI — keyword-rich, under 160 chars, unique per product, and updated on product save.
Writing a unique, keyword-optimised WooCommerce AI SEO meta description for every product is one of the most time-consuming SEO tasks a store owner faces. A 500-product catalogue means 500 individual meta descriptions — each one needing to include the target keyword, communicate the product’s key benefit, stay under 160 characters, and read naturally. A WooCommerce AI SEO meta description generator automates the entire workflow: the AI reads the product name, short description, and key attributes, then generates a click-optimised WooCommerce AI SEO meta description that matches your tone of voice and includes the focus keyword — all triggered automatically on product save.

WooCommerce AI SEO Meta Description: The Quality Problem at Scale
Most WooCommerce stores fall into one of three bad patterns for meta descriptions. The first is no meta description at all — Google generates its own snippet, usually a random sentence from the product description that neither includes the focus keyword nor drives click-throughs. The second is duplicate meta descriptions — the same generic template copied across entire product categories. The third is manually written descriptions that start strong and degrade in quality as the team runs out of time partway through the catalogue.
A WooCommerce AI SEO meta description generator solves all three patterns simultaneously. Every product gets a unique, consistent, high-quality meta description that is written to the same standard regardless of catalogue size. The AI generation is triggered on product save, so new products added by any team member automatically receive a WooCommerce AI SEO meta description without any additional workflow.
WooCommerce AI SEO Meta Description: Before and After Examples
The quality difference between a manually-skipped meta description and an AI-generated one is significant for click-through rate. Here are real examples of the improvement a WooCommerce AI SEO meta description generator delivers:
Google auto-generates: “Blue cotton hoodie. Available in sizes S to XL. Add to cart…”
Heavyweight blue cotton hoodie — 380gsm, preshrunk, unisex fit S-XL. Free UK delivery over £50. Shop the full range.
“Shop our range of kitchen knives. Free delivery available. Quality guaranteed.”
Damascus chef knife, 8-inch VG-10 steel blade, rosewood handle. Lifetime sharpening guarantee. Next-day UK delivery.
WooCommerce AI SEO Meta Description: Build the Generator
Implement the WooCommerce AI SEO meta description generator by hooking into woocommerce_product_object_updated_props or save_post, extracting the product data, calling the AI API with a structured prompt, and writing the result to the RankMath meta description field.
<?php
add_action( 'save_post_product', 'caz_generate_ai_seo_meta_description', 20, 2 );
function caz_generate_ai_seo_meta_description( int $post_id, WP_Post $post ): void {
// Skip auto-saves, revisions, and if meta already set manually
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;
if ( wp_is_post_revision( $post_id ) ) return;
$product = wc_get_product( $post_id );
if ( ! $product ) return;
// Only generate if the WooCommerce AI SEO meta description is empty
$existing = get_post_meta( $post_id, 'rank_math_description', true );
if ( ! empty( $existing ) ) return;
$name = $product->get_name();
$short_desc = wp_strip_all_tags( $product->get_short_description() );
$attributes = [];
foreach ( $product->get_attributes() as $attr ) {
$attributes[] = $attr->get_name() . ': ' . implode( ', ', $attr->get_options() );
}
$prompt = "Write a WooCommerce SEO meta description for this product.
Product: {$name}
Short description: {$short_desc}
Key attributes: " . implode( ' | ', array_slice( $attributes, 0, 5 ) ) . "
Requirements:
- Under 155 characters (count carefully)
- Include the product name naturally
- Mention 1-2 key selling points
- End with a soft call to action
- British English
- No quotes or special characters
Return only the meta description text, nothing else.";
$meta = caz_call_ai_for_meta( $prompt );
if ( $meta && strlen( $meta ) <= 160 ) {
update_post_meta( $post_id, 'rank_math_description', sanitize_text_field( $meta ) );
}
}
function caz_call_ai_for_meta( string $prompt ): string {
$response = wp_remote_post( 'https://api.openai.com/v1/chat/completions', [
'headers' => [
'Authorization' => 'Bearer ' . get_option( 'caz_openai_key' ),
'Content-Type' => 'application/json',
],
'body' => wp_json_encode([
'model' => 'gpt-4o-mini',
'max_tokens' => 80,
'messages' => [
[ 'role' => 'user', 'content' => $prompt ],
],
]),
'timeout' => 20,
]);
if ( is_wp_error( $response ) ) return '';
$body = json_decode( wp_remote_retrieve_body( $response ), true );
return trim( $body['choices'][0]['message']['content'] ?? '' );
}WooCommerce AI SEO Meta Description: Bulk Backfill for Existing Products
For an existing catalogue with empty meta descriptions, run a WP-CLI command or a scheduled admin action to backfill all products without triggering individual save hooks for each one.
<?php
// Register WP-CLI command for bulk WooCommerce AI SEO meta description generation
if ( defined( 'WP_CLI' ) && WP_CLI ) {
WP_CLI::add_command( 'caz generate-meta', function( $args, $assoc ) {
$products = wc_get_products([
'limit' => -1,
'status' => 'publish',
'return' => 'ids',
]);
$count = 0;
foreach ( $products as $id ) {
$existing = get_post_meta( $id, 'rank_math_description', true );
if ( ! empty( $existing ) ) continue;
caz_generate_ai_seo_meta_description( $id, get_post( $id ) );
$count++;
WP_CLI::line( "Generated WooCommerce AI SEO meta description for product #{$id}" );
sleep( 1 ); // Rate limit respect
}
WP_CLI::success( "Generated {$count} WooCommerce AI SEO meta descriptions." );
});
}💡 Set max_tokens to 80 when calling AI for a WooCommerce AI SEO meta description — a 155-character meta description is approximately 35–40 tokens. Capping at 80 prevents the AI from generating a paragraph and keeps API cost minimal. For a 500-product catalogue, bulk generation with GPT-4o-mini costs under $0.50 total for all WooCommerce AI SEO meta descriptions.
The RankMath meta description documentation covers the rank_math_description post meta key used to store WooCommerce AI SEO meta descriptions. The OpenAI Chat Completions API documentation covers the endpoint used for AI generation. The WP-CLI command documentation covers the bulk backfill approach. See our WooCommerce AI inventory forecast guide for more AI automation patterns, and our WooCommerce development services for custom AI integrations.
Frequently Asked Questions — WooCommerce AI SEO Meta Description
How do I auto-generate WooCommerce AI SEO meta descriptions?
Hook into save_post_product to detect when a product is saved. Extract the product name, short description, and attributes. Build a structured prompt specifying the 155-character limit, British English, and focus keyword requirements. Call the AI API (OpenAI gpt-4o-mini or Claude claude-haiku-4-5) with max_tokens set to 80. Write the response to the rank_math_description post meta field. New products automatically receive a WooCommerce AI SEO meta description on first save.
Which AI model is best for WooCommerce AI SEO meta description generation?
GPT-4o-mini and Claude Haiku are both well-suited for WooCommerce AI SEO meta description generation — they are fast, cheap (under $0.001 per meta description), and produce consistently well-structured output when given a clear prompt with character limit instructions. Avoid using larger models like GPT-4o or Claude Sonnet for meta descriptions — the quality improvement is marginal for this task while the cost is 10-20x higher. Batch backfilling a 1,000-product catalogue with GPT-4o-mini costs under $1.
How do I make sure WooCommerce AI SEO meta descriptions stay under 160 characters?
Include the character limit explicitly in the AI prompt: “Under 155 characters (count carefully)”. Set max_tokens to 80 to prevent over-generation. After receiving the response, validate with strlen() and only save if under 160 characters. If validation fails, retry with a stricter prompt or truncate at the last complete word before 160 characters. A 155-character target gives a 5-character safety buffer for the WooCommerce AI SEO meta description.
Will AI-generated WooCommerce AI SEO meta descriptions hurt SEO?
No — AI-generated WooCommerce AI SEO meta descriptions do not hurt SEO. Google’s guidelines do not penalise AI-generated meta descriptions as long as they are accurate, helpful, and not keyword-stuffed. The SEO benefit comes from having unique, keyword-rich meta descriptions on every product rather than duplicate or missing ones. A well-prompted WooCommerce AI SEO meta description generator consistently outperforms manually-written descriptions for stores that previously had no meta descriptions at all.
How do I prevent the generator from overwriting manually edited meta descriptions?
Check whether rank_math_description already has a non-empty value before calling the AI. If it does, skip generation. This ensures manual edits by your SEO team are never overwritten by the WooCommerce AI SEO meta description generator. For bulk backfills, only process products where the meta field is empty. Add a custom post meta flag like caz_meta_manually_edited = 1 for products where you want to permanently prevent AI generation.
Can I generate WooCommerce AI SEO meta descriptions for all existing products?
Yes — register a WP-CLI command that iterates all published products, skips those with existing rank_math_description values, calls the AI for each empty one, and saves the result. Add a 1-second sleep between API calls to respect rate limits. For 500 products at 1 second per call, the bulk WooCommerce AI SEO meta description backfill takes approximately 8-10 minutes. Run it during low-traffic hours to avoid any admin performance impact.
Want AI-Generated Meta Descriptions for Your Store?
CodeAtoZ builds custom WooCommerce AI SEO meta description generators — API integration, bulk backfill, RankMath hook, and tone-of-voice configuration for your brand.