Group WooCommerce products into a collection with AI
Put related products on one collection page, each with its own price, saved as a draft for you to check.
Prerequisites
A connected site running WooCommerce 10.9 or newer on WordPress 6.9 or newer, with the products already in the store, and a public link to a photo for the collection.
Make a collection in my WooCommerce store: a grouped product that shows these products on one page. - Collection name: [Winter Trip Set] - Products to include: [Beanie, Cap, Sunglasses] - Category: [category name] - Photo: [public link to a photo for the collection] - What it is for: [a line or two of notes] Find each product with the woocommerce/products-query ability (search by its name, status publish). Show me a table of the matches with id, name, type, price and stock status, and point out any close names so I pick the right one. Leave out any product with options (type variable) and tell me which ones you left out. Point out any that are out of stock, affiliate (type external) or have no price, since those show a button instead of a quantity box. Wait for my yes on the list. On my yes, write a two-sentence short description from my notes and create the collection with the woocommerce/product-create ability: product_type_alias grouped, name set to the collection name, status draft, grouped_products set to the ids I approved. Then upload the photo with upload_media, find my category's id with the WooCommerce REST API (GET /wc/v3/products/categories with search set to the category name and per_page 100; if it does not exist, stop and ask me before creating one), and set the category and the image with PUT /wc/v3/products/ followed by the product id (categories and images). Do not publish. Last, read the product back with products-query (its id) and confirm the status is draft and the grouped_products list matches what I approved. Give me the product id, the edit link and the preview link.
Skip pasting the full prompt. Drop this into your AI on a site that already has WPVibe:
Run the “Group WooCommerce products into a collection with AI” recipe from the WPVibe cookbook on my connected site.
Some products sell together: the cap, beanie and sunglasses for a winter trip, or the three mugs in a set. You want one page that shows them side by side so a shopper can add any of them in one go, but WooCommerce's grouped product type is buried in the product type dropdown, and linking the right items means searching for each one in a small box.
The AI finds the products you name through WooCommerce's own product abilities and shows you the matches with their ids and prices, so a near match like Beanie with Logo does not slip in for Beanie. On your yes it creates a grouped product as a draft with those items and your short description, then sets the image and category through the WooCommerce REST API. When published, the collection page lists every item with its own price and, for items you sell here that are in stock, a quantity box, and each one is still sold and stocked as its own product.
Fill in the brackets and paste the prompt. A grouped product has no price of its own: the store shows a price range from the cheapest item to the most expensive, and each item keeps its price, stock and sale. Items with sizes or colors, affiliate items, items with no price and anything out of stock show a button in place of a quantity box, so the AI leaves out the ones with options and points out any that are out of stock. Nothing is published until you do it.
Outcome
A draft collection page that lists the products you picked, each with its own price, waiting for you to publish.