Create a Google Shopping Feed for WooCommerce with Product Feed PRO and AI
A draft Google Shopping feed with fields, prices and categories mapped, generated and checked, with its link for Merchant Center.
Prerequisites
A WooCommerce store connected to WPVibe running Product Feed PRO for WooCommerce 13.5.9 or newer (tested on 13.5.9, free) on WordPress 6.9 or newer, with an administrator account.
My WooCommerce store uses Product Feed PRO by AdTribes. Create a Google Shopping feed for [the country I sell to, for example the United States] as a draft, so I can add it to Google Merchant Center. Brand: [your brand name, if every product you sell is your own brand; or write: I sell other makers' products]. 1. Run discover_abilities with category adtribes. If the abilities this needs are not there, stop and tell me to install or update the free Product Feed PRO for WooCommerce plugin by AdTribes (13.5.9 or newer, with WooCommerce active, on WordPress 6.9 or newer). 2. Run adtribes/list-feeds with channel Google Shopping. If a feed for this country already exists, show it to me and ask whether to make another one as a draft. If I say no, stop: tell me to change the existing feed in Product Feed PRO's Field Mapping tab. Don't change the existing feed. 3. Get the store currency with rest_api GET /wc/v3/data/currencies/current (CURRENCY_CODE). Get the product categories with rest_api GET /wc/v3/products/categories with per_page 100 (and page 2 and up while there are more), keeping those with count above 0. Run rest_api GET /wc/v3/products with type variable, status publish and per_page 1, and note whether any come back (HAS_VARIABLE). 4. Run adtribes/create-feed with title Google Shopping and the country's name, channel Google Shopping, country the two-letter code (COUNTRY_CODE), file_format xml and post_status draft. Note the feed_id (FEED_ID) and file_url. Use xml: a csv feed made this way has no column separator and fails to generate. 5. Run adtribes/set-field-mapping with feed_id FEED_ID and these attributes, each with attribute and mapfrom: g:id from id, g:title from title, g:description from description, g:link from link, g:image_link from image, g:checkout_link_template from cart_link, g:availability from availability, g:price from price with suffix set to a space and CURRENCY_CODE, g:sale_price from sale_price with the same suffix, g:google_product_category from categories, g:brand and g:mpn (see below), g:identifier_exists from calculated, g:condition from condition, g:item_group_id from item_group_id. For g:brand and g:mpn: if my brand above is still in brackets or unclear, ask me first. Only if I gave my brand name as the brand of every product, add g:brand with mapfrom set to my brand name and static_value set to the text true, and g:mpn from sku. Otherwise run adtribes/list-feed-attributes, show me the attributes that could hold the brand and the maker's part number, and ask which to use; leave out any I have no attribute for, and tell me. Ask the same way before mapping a GTIN attribute. Leave g:product_type out: Product Feed PRO writes an ampersand in it as HTML code and joins a product's categories with two bars, so it would read wrong to Google; it is optional there. After the call, compare the attributes it returns with what you sent; if they differ, stop and tell me to set the mapping in Product Feed PRO's Field Mapping tab. 6. Map at most 20 categories: WPVibe sends this call's input in the web address, which sites refuse when it gets too long (in our test 30 categories went through and 40 failed). If more than 20 categories have products, take the 20 with the most products and list the rest for me to map in the feed's Category Mapping tab in Product Feed PRO afterwards. For each category you map, run adtribes/list-google-taxonomy with search set to one word from its name and pick the closest Google category. If it returns adt_taxonomy_unavailable, Product Feed PRO doesn't have Google's category list yet: skip the category mapping, tell me to try again later, and go on to step 7. Show me a table (my category, its product count, the Google category) and wait for my yes. Leave out a category when nothing fits, and say so. On my yes, run adtribes/set-category-mapping once with feed_id FEED_ID and mappings keyed by each category's term ID, each row with rowCount and categoryId set to that term ID, criteria set to the category name as plain text (the REST API returns an ampersand as an HTML entity: send it as a plain ampersand), and map_to_category set to the Google category's id from adtribes/list-google-taxonomy, as text (the number, which is what Product Feed PRO's own Category Mapping tab saves: a path is cut at its first hyphen, so Ride-On Toys would become Ride). Send every row in that one call: each call replaces the whole mapping, and a row without categoryId and criteria maps nothing. 7. Regenerate the feed. First run adtribes/get-feed-stats with feed_id FEED_ID and note its last_updated, then run adtribes/regenerate-feed with feed_id FEED_ID. Generation is queued and runs in the background, so the status can stay ready with the old last_updated for a minute or more: run adtribes/get-feed-stats about every 30 seconds until last_updated has changed and status is ready, or has_error is true, at most 10 times. If it hasn't finished by then, tell me it is still queued and stop there; when I say continue, pick up from this step without starting over. 8. Run adtribes/get-feed-validation with feed_id FEED_ID. Leave out the line saying the feed has no target country set: on Product Feed PRO 13.5.9 that check always fires, so valid never turns true. Check the country in adtribes/get-feed instead. It also lists as not mapped any field we left out on purpose (g:product_type, and g:brand, g:mpn or a GTIN when I had no attribute for them): name those as left out on purpose and remind me that Google may ask for brand, MPN or GTIN. Tell me anything else it lists. 9. Give me the file_url. If you can fetch it, show me three products as they appear in the file. If HAS_VARIABLE, tell me that Product Feed PRO leaves variable products out of a feed unless Include product variations is ticked, and no ability can tick it: I should open the feed in Product Feed PRO, tick Include product variations in its General tab and save, then tell you, and you regenerate it the same way as step 7. Each variation is then its own item in the feed. Leave the feed as a draft. Tell me the file won't update while the feed is a draft, so its prices and stock will go out of date: before Google starts reading it, I should publish it with a refresh schedule. Tell me that when I'm ready, I can say: publish the feed and refresh it daily. When I do, run adtribes/update-feed with feed_id FEED_ID and post_status publish, then adtribes/set-feed-schedule with feed_id FEED_ID and refresh_interval daily, and confirm scheduled is true. 10. List each change you made so I can spot-check it.
Skip pasting the full prompt. Drop this into your AI on a site that already has WPVibe:
Run the “Create a Google Shopping Feed for WooCommerce with Product Feed PRO and AI” recipe from the WPVibe cookbook on my connected site.
To show your products in Google Shopping, Google Merchant Center needs a product feed: a file listing every product with its price, stock, link and image. Product Feed PRO builds it, but the first setup means matching a dozen fields and every product category by hand, so it sits on the list for weeks.
The AI creates the feed as a draft in Product Feed PRO, maps each Google field to your product data, mostly from the sources the plugin’s own editor suggests, adds your currency to prices, and finds the closest Google category for each of your product categories. You approve the category table before it is saved. Then it generates the file, checks it and gives you the link to add in Merchant Center.
Paste the prompt, name the country you sell to and your brand, and say yes to the category table. The AI maps up to 20 categories, those with the most products; map any others in the feed’s Category Mapping tab. The feed’s file doesn’t update while it is a draft, so publish it with a daily refresh, as the prompt offers, before Google starts reading it. Keep the feed in XML: a CSV feed made this way failed in our test. If you sell variable products, tick Include product variations in the feed’s General tab, or they are left out. Make later field mapping changes in Product Feed PRO’s Field Mapping tab.
Outcome
A generated Google Shopping feed, saved as a draft in Product Feed PRO, with its file link to add in Google Merchant Center.