WC to GPT
WordPress plugin that generates ChatGPT-compatible product feeds for WooCommerce stores
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/codevera-ai/wc-to-gpt/archive/refs/heads/main.zipA WordPress plugin that generates ChatGPT-compatible product feeds for WooCommerce stores, following the OpenAI Product Feed Specification.
Overview
WC to GPT creates a JSONL (JSON Lines) product feed that allows ChatGPT to understand and recommend your products to customers. The feed is compressed using gzip and secured with token-based authentication.
Requirements
- WordPress 6.0 or higher
- WooCommerce 7.0 or higher
- PHP 7.4 or higher
Installation
- Upload the
wc-to-gptfolder to/wp-content/plugins/ - Activate the plugin through the WordPress admin
- Navigate to WooCommerce > GPT Feed to configure
Configuration
The plugin settings are organised into three tabs: Settings, Scheduler, and Feed Status.
Settings tab
General settings
Enable feed Toggles feed generation on or off. When disabled, the feed URL will not return any data.
Categories Select which product categories to include in the feed. If no categories are selected, all products are included.
- Use the search box to filter categories by name
- Click category names to expand/collapse subcategories
- Use "Select all" and "Deselect all" for bulk selection
Seller information
Seller name Your business name as it will appear in ChatGPT. Defaults to your site name.
Default product attributes
Default brand Fallback brand name used when products do not have a brand set.
Default material Fallback material value used when products do not have a material set.
Security
Access token A unique token required to access the feed. Keep this private. If compromised, tick "Regenerate on save" and save settings to create a new token.
Scheduler tab
Frequency options
- Hourly - Regenerates the feed every hour
- Twice daily - Regenerates the feed every 12 hours
- Daily - Regenerates the feed once per day (recommended for most stores)
- Manual only - Feed only updates when you click "Regenerate feed"
Scheduler status
Displays the current schedule status including:
- Current schedule frequency
- Whether scheduling is active
- Next scheduled run time
- Last generation time
- Whether auto-scheduling is enabled on your hosting
Server-level scheduling
For more reliable timing on low-traffic sites, you can configure your server to trigger WordPress scheduled tasks directly:
- Add
define( 'DISABLE_WP_CRON', true );to yourwp-config.php - Create a cron job in your hosting control panel to request the scheduler URL every 5 minutes
Feed Status tab
Current status
Displays feed statistics:
- Status - Current state (Idle, Generating, Complete, or Error)
- Last generated - When the feed was last updated
- Products - Number of products in the feed
- File size - Size of the compressed feed file
If products show as 0 after generation, check that your products are published and belong to the selected categories.
Feed URL
The URL to provide to OpenAI. This includes your access token so keep it private. Use the "Copy" button to copy the full URL.
Manual regeneration
Click "Regenerate feed" to immediately update the feed without waiting for the next scheduled run.
Using with ChatGPT
- Navigate to WooCommerce > GPT Feed > Feed Status
- Copy the Feed URL
- Provide this URL to OpenAI when configuring your ChatGPT integration
- ChatGPT will fetch and parse your product catalogue from this URL
Feed format
The feed follows the OpenAI Product Feed Specification:
- Format: JSONL (one JSON object per line)
- Compression: gzip
- Authentication: Token-based (query parameter)
Each product line includes:
- Product ID and title
- Description
- Price and currency
- URL and image URL
- Availability status
- Brand, MPN, and GTIN (when available)
- Category information
- Attributes (size, colour, material, etc.)
Product identifiers
The feed requires at least one product identifier. The plugin uses these in order of priority:
- GTIN (if set via custom field)
- MPN (if set via custom field)
- SKU (WooCommerce SKU field)
- Product ID (automatic fallback using format
WC-{id})
Variable products
Variable products are included as separate entries for each variation, allowing ChatGPT to recommend specific variants based on customer preferences.
Per-product settings
Individual products can be configured via the "GPT Feed" meta box on the product edit screen:
Exclude from feed Tick this to remove a specific product from the feed.
Custom description Override the product description with text optimised for ChatGPT (max 5000 characters).
Troubleshooting
Feed shows 0 products
- Verify feed generation is enabled in Settings
- Check that products are published (not draft or private)
- Confirm products belong to selected categories, or deselect all categories to include everything
- Ensure products have prices set
Feed URL returns an error
- Verify the access token in the URL matches the one in Settings
- Check that the feed has been generated at least once
- Ensure feed generation is enabled
Scheduled regeneration not running
- WordPress scheduling depends on site traffic to trigger tasks
- On low-traffic sites, consider setting up server-level scheduling
- Check that your hosting has not disabled WP-Cron
Feed file is empty
- Products may be excluded due to missing required data
- Check individual products are not marked as "Exclude from feed"
- Verify WooCommerce is active and products exist
File locations
- Feed file:
/wp-content/uploads/wctogpt-feeds/products.jsonl.gz - Log file:
/wp-content/uploads/wctogpt-feeds/wctogpt.log
Hooks and filters
Filters
wctogpt_product_data
Modify product data before it is written to the feed.
add_filter( 'wctogpt_product_data', function( $data, $product ) {
// Modify $data array
return $data;
}, 10, 2 );
wctogpt_include_product
Control whether a product is included in the feed.
add_filter( 'wctogpt_include_product', function( $include, $product ) {
// Return false to exclude
return $include;
}, 10, 2 );
Uninstallation
When the plugin is deleted (not just deactivated), it removes:
- All plugin settings from the database
- The feeds directory and all generated files
- Scheduled tasks
Support
For issues and feature requests, contact info@codevera.ai.
Licence
GPL-2.0+