Hello guys how are you? Welcome back to my blog therichpost.com. Guys today in this post, I will tell show you How to Combine Short and Long Descriptions in WooCommerce for AI Product Listings?
Guys if you are new in WordPress or in WooCommerce then please check the below links for some good tutorials:
Guys to combine the WooCommerce Short Product Description with the Long Description in your AI Product Listing Tool, especially when you’re only displaying the Long Description, follow this approach:
✅ Goal:
If you want the Short Description content to be included within the Long Description, so the AI Product Listing Tool processes a combined version.
🔧 Step-by-Step Implementation:
🔁 Option 1: Modify the Long Description Output in WooCommerce (Recommended for Templates)
If you’re customizing the product page (or feeding data into an AI tool), use this logic in your theme or plugin file:
add_filter('the_content', 'combine_short_and_long_description');
function combine_short_and_long_description($content) {
if (is_product()) {
global $post;
$short_description = apply_filters('woocommerce_short_description', $post->post_excerpt);
$combined_description = $short_description . "\n\n" . $content;
return $combined_description;
}
return $content;
}
✅ This filter prepends the short description to the long description on product pages.
🧠 Option 2: For AI Product Listing Tool – Merge on Backend or Export
If you’re using an AI tool that pulls data from WooCommerce:
- Export both descriptions via WooCommerce REST API or CSV export.
- In your data preparation script, combine them before sending to AI:
$short_description = get_post_field('post_excerpt', $product_id);
$long_description = get_post_field('post_content', $product_id);
$combined_description = $short_description . "\n\n" . $long_description;
Then send $combined_description
to your AI tool instead of only the long description.
📝 Example Combined Output:
Short Description:
A lightweight, stylish men’s jacket perfect for all seasons.
Long Description:
Crafted from premium materials, this jacket offers comfort, durability, and a modern look for any occasion. Whether you’re heading to work or out for a weekend trip, it’s the ideal outerwear for unpredictable weather.
➡️ Final Combined:
A lightweight, stylish men’s jacket perfect for all seasons.
Crafted from premium materials, this jacket offers comfort, durability, and a modern look for any occasion...
Let me know what system or plugin you’re using for the AI listing, and I can tailor the solution even more precisely (e.g. WP All Export, REST API, or a custom tool).
Ajay
Thanks