Commit 2dbc3e13c2e for woocommerce
commit 2dbc3e13c2e1081358bf8efdf63e77f3f19c483b
Author: AnnaMag <AnnaMag@users.noreply.github.com>
Date: Thu Nov 26 13:09:44 2026 +0100
Agent readiness: setup counts, one reason in coming soon mode, and a clearer support download (#71461)
* Agent readiness: one count and one reason on a store that is still being set up
Seen on a store in coming soon mode with no products:
- Fix first held only setup steps under a line about ranking fixes by products and sales. It now counts the steps, as the Setup checklist does.
- The Setup checklist said "Finish 6 required steps" next to a "7 steps left" badge. The badge now counts the required steps while any is left, then the optional ones.
- Store access showed the AI shopping note and the coming soon row together. In coming soon mode it shows only the row.
* Agent readiness: count only setup steps in the Fix first setup line
A required check the scan read, such as the store's connection, is not a setup step, so a card holding one keeps its ranking line and link.
* Agent readiness: support download named after the page, and no passes with no products
- The header and file name said "AI sales readiness"; the page is AI shopping health.
- With no products checked, every product check showed a check mark. It now says "No products to check."
- A policy step is done once its page is published, so its name says "selected and published": a selected draft read as "is selected" with a failing mark.
* Agent readiness: test the no-products line where the support download ends
* Agent readiness: guest checkout off means no checkout through an assistant
The report said an assistant could still check out when the shopper created an account at checkout. The store serves no checkout to assistants while checkout requires an account, whatever the account creation setting.
* Agent readiness: the support download says whether daily checks are on
* Agent readiness: count only required steps in the Fix first line
* Agent readiness: keep the daily checks line after what the check covered
* Agent readiness: the report's texts say AI assistants, as the pages do
The why texts in the report, which the REST report and the report ability return, still said agents. The reviewed page copy says AI assistants throughout.
* Agent readiness: a required step left and Product visibility read the same everywhere
- The support download said AI shopping was "On" while the page showed a Required step and Needs attention. It now says "On, with required steps left", by the rule the badge uses.
- The Overview card counted every open step; the Setup checklist badge counts the required ones while any is left. The card now counts the same.
- Product visibility on AI shopping came from the last check, so after products were added, hidden or removed it disagreed with AI shopping health and with the lists its cards link to. It is counted when the page loads.
diff --git a/plugins/woocommerce/changelog/fix-agent-readiness-setup-list-display b/plugins/woocommerce/changelog/fix-agent-readiness-setup-list-display
new file mode 100644
index 00000000000..ae304c2dc26
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-agent-readiness-setup-list-display
@@ -0,0 +1,3 @@
+Significance: patch
+Type: dev
+Comment: Agent readiness: a Fix first card with only setup steps counts them, the Setup checklist badge counts the required steps, and Store access shows one reason in coming soon mode. The support download is named after the page, says when no products were checked, and names policy steps as selected and published. The report no longer says an assistant can check out with guest checkout off. The report's texts say AI assistants, as the pages do. A required step left reads the same on the Overview card, the Setup checklist and the support download, and Product visibility is counted when the page loads. The feature is unreleased.
diff --git a/plugins/woocommerce/src/Internal/AgentReadiness/AgenticCommerceSettingsPage.php b/plugins/woocommerce/src/Internal/AgentReadiness/AgenticCommerceSettingsPage.php
index 091ba481998..41693bc6509 100644
--- a/plugins/woocommerce/src/Internal/AgentReadiness/AgenticCommerceSettingsPage.php
+++ b/plugins/woocommerce/src/Internal/AgentReadiness/AgenticCommerceSettingsPage.php
@@ -358,8 +358,8 @@ class AgenticCommerceSettingsPage extends \WC_Settings_Page {
}
/**
- * Product visibility: the counts from the last stored readiness report, each with a link to those
- * products, or a line saying they show after the first check.
+ * Product visibility: the catalog counts as they stand now, each with a link to those products, or a
+ * line saying they show after the first check.
*
* @param array<string, mixed>|null $report Stored report, or null before the first scan.
* @return array{title:string,description:string,empty:string|null,counts:array<int, array{id:string,label:string,count:string,tip:string,tip_label:string,link:array{href:string,text:string}}>}
@@ -367,7 +367,9 @@ class AgenticCommerceSettingsPage extends \WC_Settings_Page {
private static function visibility( ?array $report ): array {
$counts = array();
if ( null !== $report ) {
- $cards = array(
+ // Counted now: products added, hidden or removed since the last check count, as in the lists the cards link to.
+ $report = array_merge( $report, ProductScan::catalog_counts() );
+ $cards = array(
// The whole catalog, like the other two; `products` stops at PRODUCT_LIMIT. Reports from before `available` have only `products`.
array( ProductScan::COUNT_AVAILABLE, __( 'Visible', 'woocommerce' ), (int) ( $report['available'] ?? $report['products'] ?? 0 ), '', '' ),
array( ProductScan::COUNT_HIDDEN, __( 'Hidden', 'woocommerce' ), (int) ( $report['hidden_from_catalog'] ?? 0 ), __( 'Products set to Hidden in Catalog visibility.', 'woocommerce' ), __( 'More information about hidden products', 'woocommerce' ) ),
@@ -408,8 +410,7 @@ class AgenticCommerceSettingsPage extends \WC_Settings_Page {
$open = ReadinessCheckPage::open_steps( $checks );
$required = count( array_filter( $open, array( StoreConditions::class, 'shows_required' ) ) );
if ( $required > 0 ) {
- /* translators: %d: number of failing required setup steps. */
- $summary = sprintf( _n( 'Finish %d required step to get your store ready for AI shopping.', 'Finish %d required steps to get your store ready for AI shopping.', $required, 'woocommerce' ), $required );
+ $summary = ReadinessCheckPage::required_steps_summary( $required );
} elseif ( array() !== $open ) {
/* translators: %d: number of open setup steps. */
$summary = sprintf( _n( 'Your store is ready for AI shopping. You have %d optional step left.', 'Your store is ready for AI shopping. You have %d optional steps left.', count( $open ), 'woocommerce' ), count( $open ) );
@@ -452,6 +453,8 @@ class AgenticCommerceSettingsPage extends \WC_Settings_Page {
);
}
+ // The badge counts what the summary counts: the required steps while any is left, then the optional ones.
+ $left = $required > 0 ? $required : count( $open );
return array(
'title' => __( 'Setup checklist', 'woocommerce' ),
// As in the design: the steps left, or All steps done in green once none are.
@@ -461,7 +464,7 @@ class AgenticCommerceSettingsPage extends \WC_Settings_Page {
) : array(
'intent' => 'none',
/* translators: %d: number of setup steps left. */
- 'text' => sprintf( _n( '%d step left', '%d steps left', count( $open ), 'woocommerce' ), count( $open ) ),
+ 'text' => sprintf( _n( '%d step left', '%d steps left', $left, 'woocommerce' ), $left ),
),
'summary' => $summary,
'steps' => $steps,
diff --git a/plugins/woocommerce/src/Internal/AgentReadiness/Checks/SimpleCheck.php b/plugins/woocommerce/src/Internal/AgentReadiness/Checks/SimpleCheck.php
index a66d5f56de9..ff3ce079c67 100644
--- a/plugins/woocommerce/src/Internal/AgentReadiness/Checks/SimpleCheck.php
+++ b/plugins/woocommerce/src/Internal/AgentReadiness/Checks/SimpleCheck.php
@@ -114,7 +114,7 @@ final class SimpleCheck extends AbstractReadinessCheck {
'uncategorised',
array(
'label' => __( 'Products with only the default category', 'woocommerce' ),
- 'why' => __( 'Agents narrow searches by category first; an uncategorised product is harder to find.', 'woocommerce' ),
+ 'why' => __( 'AI assistants narrow searches by category first; an uncategorised product is harder to find.', 'woocommerce' ),
'fix' => __( 'Assign a category.', 'woocommerce' ),
),
self::fields( array( 'product_category', 'product_type', 'productType' ), self::EFFECT_GAPS ),
@@ -163,7 +163,7 @@ final class SimpleCheck extends AbstractReadinessCheck {
'image_alt_text',
array(
'label' => __( 'Products whose main image has no alt text', 'woocommerce' ),
- 'why' => __( 'AI agents and screen readers read alt text to tell what an image shows. No channel\'s feed asks for it, so it doesn\'t change the channel counts.', 'woocommerce' ),
+ 'why' => __( 'AI assistants and screen readers read alt text to tell what an image shows. No channel\'s feed asks for it, so it doesn\'t change the channel counts.', 'woocommerce' ),
'fix' => __( 'Describe the main image in its Alternative text field in the media library.', 'woocommerce' ),
),
array(),
diff --git a/plugins/woocommerce/src/Internal/AgentReadiness/ProductScan.php b/plugins/woocommerce/src/Internal/AgentReadiness/ProductScan.php
index 95192f3412d..b4198f56bc9 100644
--- a/plugins/woocommerce/src/Internal/AgentReadiness/ProductScan.php
+++ b/plugins/woocommerce/src/Internal/AgentReadiness/ProductScan.php
@@ -464,6 +464,23 @@ class ProductScan {
return array( self::supported_type_query(), self::catalog_query( self::COUNT_HIDDEN === $count ) );
}
+ /**
+ * The catalog counts as they stand now, by report key, so a count matches the Products list it links to.
+ * Every published product is in one of the three, so the available ones are the rest: counting them
+ * with their own query takes seconds on a large catalog.
+ *
+ * @return array{available:int,hidden_from_catalog:int,unsupported_types:int}
+ */
+ public static function catalog_counts(): array {
+ $hidden = self::count_published( self::count_query( self::COUNT_HIDDEN ) );
+ $unsupported = self::count_published( self::count_query( self::COUNT_UNSUPPORTED ) );
+ return array(
+ 'available' => max( 0, (int) wp_count_posts( 'product' )->publish - $hidden - $unsupported ),
+ 'hidden_from_catalog' => $hidden,
+ 'unsupported_types' => $unsupported,
+ );
+ }
+
/**
* Tax query for a supported type. A product with no type term loads as simple.
*
diff --git a/plugins/woocommerce/src/Internal/AgentReadiness/README.md b/plugins/woocommerce/src/Internal/AgentReadiness/README.md
index d3151ad90c2..beb3833ccf3 100644
--- a/plugins/woocommerce/src/Internal/AgentReadiness/README.md
+++ b/plugins/woocommerce/src/Internal/AgentReadiness/README.md
@@ -212,8 +212,8 @@ WooCommerce > Settings > AI tools (`AgenticCommerceSettings`, `AgenticCommerceSe
AI shopping has one card per part:
- The UCP switch, first, with Learn how it works. It saves on its own through `POST wc/v3/agent-readiness/ucp` (`{ "enabled": true }`). A failing required check keeps it from being turned on, and that POST answers 409; turning it off still works. Turning it on writes the discovery file under Plain permalinks and checks again, so a failed write leaves it on with `needs_attention` and `ucp_discovery` failing. After it changes, a snackbar says "AI assistants can now shop your store." or "AI assistants can no longer shop your store.", except when it turns on with `needs_attention`: then the page shows Needs attention and the step to fix. The page reloads after it changes and shows the snackbar, unless a policy field has unsaved changes; then the snackbar shows at once and it asks to save them. In coming soon mode the card has a warning notice that agents can't shop the store yet, with Change store visibility.
-- Product visibility: Visible, Hidden and Not supported, from the stored report (`products`, `hidden_from_catalog`, `unsupported_types`). Each links to the Products list filtered to those products (`ProductScan::count_query()`, the query the scan counts with). Hidden and Not supported have an info button that opens a popover saying what they mean.
-- Setup checklist: a badge with how many steps are left, then the store conditions from `StoreConditions`, the same list the readiness report shows. Open conditions are one list, failing `required` ones first (coming soon mode, HTTPS and the UCP address), marked Required; failing `recommended` ones, such as a missing privacy, terms, refund and returns, or shipping policy page (policy pages are not required by the UCP spec), follow. The card says how many required steps are left to fix, or how many steps are left when none is required. Each step says why it matters and links to where to fix it; a chosen policy page that isn't published links to its editor, and a store page chosen as one asks for another page. Each open step's button says where it goes (View Site Health, Choose page, Edit page and so on). Passing conditions fold behind "Show N completed steps", with the same title and why line. Both lists, and the setup steps in Fix first, go by importance (`ReadinessCheckPage::SETUP_ORDER`): what blocks AI shopping (live, HTTPS, readable permalinks), then payments, the privacy, terms and refund pages, search engine indexing and order emails, then guest checkout and the shipping policy page.
+- Product visibility: Visible, Hidden and Not supported, counted when the page loads (`ProductScan::catalog_counts()`), so they match the lists they link to after products change; the report keeps the counts from the last check. Each links to the Products list filtered to those products (`ProductScan::count_query()`, the query the scan counts with). Hidden and Not supported have an info button that opens a popover saying what they mean.
+- Setup checklist: a badge with how many steps are left (the required ones while any is left, as the summary line counts them, then the optional ones), then the store conditions from `StoreConditions`, the same list the readiness report shows. Open conditions are one list, failing `required` ones first (coming soon mode, HTTPS and the UCP address), marked Required; failing `recommended` ones, such as a missing privacy, terms, refund and returns, or shipping policy page (policy pages are not required by the UCP spec), follow. The card says how many required steps are left to fix, or how many steps are left when none is required. Each step says why it matters and links to where to fix it; a chosen policy page that isn't published links to its editor, and a store page chosen as one asks for another page. Each open step's button says where it goes (View Site Health, Choose page, Edit page and so on). Passing conditions fold behind "Show N completed steps", with the same title and why line. Both lists, and the setup steps in Fix first, go by importance (`ReadinessCheckPage::SETUP_ORDER`): what blocks AI shopping (live, HTTPS, readable permalinks), then payments, the privacy, terms and refund pages, search engine indexing and order emails, then guest checkout and the shipping policy page.
- Store policy pages. Refund and returns, privacy and terms are the existing options, so they stay in sync with Advanced > Page setup and Settings > Privacy; shipping policy, FAQ and warranty are new. They are for the policy links a UCP checkout can carry (`links`); the UCP endpoints don't send them yet. The dropdowns list published pages other than the cart, checkout, shop and My account pages, and saving leaves a stored page in place even when it's a draft or one of those store pages, which then fails its check. A link from the checklist opens the page on its field, focused.
- The connection URL AI assistants start from (`/.well-known/ucp`), read only, with Copy and a link to test it in UCP Playground.
@@ -221,7 +221,7 @@ Sales readiness opens with when the last check ran and Check again ("Check your
The product checks, under "Listings in AI shopping apps", show how many products each channel can list ("2 of 15 can be listed"), then each failing product check, titled with what to do and its count ("Add a brand to 13 products"), why it matters, and "View N products", which opens the Products list filtered to them. With up to three failing products the title names them ("Add a brand to Blue hoodie and Red cap") when their failures are stored; one product without them is "a product", and more than three are counted. The copy is in `ReadinessCopy`. Product image alt text isn't listed there, since the `images_have_alt` store check covers it.
-Fix first, a card of its own, lists the required setup steps that fail, then the top three other issues. Required setup steps include the ones shown as Required (`StoreConditions::SHOWN_REQUIRED`, or `store_checks` in the rules file): `search_visible`, `payment_method`, `order_emails`, `privacy_page`, `terms_page` and `refund_returns_page`. Guest checkout is optional. Of the scanned checks, a failing `ucp_profile` or `ucp_checkout` is Required with UCP on, and so is one that keeps AI assistants off the store's pages, except `pages_public`: a store whose pages all need a login, such as a members-only store, chose that and can still be ready for AI assistants that sign in. It is Recommended: it shows in Store access without a badge and in Fix first under Needed to list products, and doesn't count toward the required steps or keep AI shopping from being turned on. A failing `ucp_endpoints_live` has no badge, like any failing check that isn't Required, and stays out of Fix first, since it can fail now and then with nothing changed on the store. While AI shopping is off, Store access notes that some checks only run when it is on; when the card has no other check to show, it says what turning AI shopping on checks instead, with a Turn on AI shopping button. A question card's badge counts its issues, says All passed, Couldn't check when nothing failed but a check tried to run and couldn't, or Not checked yet while the checks wait for the merchant (the row says why). Issues are ranked by what they stop, then by sales: store checks that block `listing` (such as structured data) and product checks that keep products off a channel (`not_listable`), then product checks that only make products harder to find. Within each, the larger share of sales on the affected products comes first, then the larger product count, then page order. Without sales to compare, a product check's count is multiplied by the AI apps it affects, so 3 products kept out of 3 apps come before 5 products kept out of 1. Store checks with no sales link, such as a missing meta description, stay out of Fix first. `ProductSales` reads each product's net sales over the last 90 days from the Analytics lookup tables (`wc_order_product_lookup` joined with `wc_order_stats`), with the order statuses Analytics excludes left out and variations counted toward their parent and on their own. The scan adds up the sales of each check's failing products. A check a variable product fails through some of its variations (a missing price or GTIN, a missing variation image, or an option set to "any") adds only those variations' sales. An invalid GTIN, a GTIN shared with another product, and an image under 500 pixels still count the whole product's sales, which only changes the rank. The report stores each check's `sales_share` (0 to 1) and `sales` (`days`, `orders`, `imported`). While Analytics is off, `sales` is null. With fewer than `ProductSales::MIN_ORDERS` (20) orders in the period, too few to rank by, shares are null. They are null too while a store with at least 20 orders has under 90% of them in Analytics (`imported` false), as when past orders were never imported. Orders in several currencies are summed without conversion, as Analytics does. In both cases Fix first ranks by product count and AI apps, and says why. It says to start with the fixes that affect the most sales, over the period the figures cover, only when an issue on the card sold something; otherwise it says it ranks by product count. A share is rounded to 4 places and any sales keep at least 0.0001, so small sales never read as "No sales". A share is not shown once a check's count changes after the scan, since it was measured on the products failing then, but Fix first still ranks the check by it (`ranked_share`), so fixing one product doesn't move the issue down. Under headings for what each group stops (Required for AI shopping, Needed to list products, Helps shoppers find products), a product issue is badged by its share of sales ("38% of sales"); its line starts with the share, the first saying over which period ("38% of your sales in the last 90 days."); products that sold nothing in the period say "No sales" instead of 0%.
+Fix first, a card of its own, lists the required setup steps that fail, then the top three other issues. When it holds only setup steps, its first line counts them as the Setup checklist does, and it has no ranking line or link. Required setup steps include the ones shown as Required (`StoreConditions::SHOWN_REQUIRED`, or `store_checks` in the rules file): `search_visible`, `payment_method`, `order_emails`, `privacy_page`, `terms_page` and `refund_returns_page`. Guest checkout is optional. Of the scanned checks, a failing `ucp_profile` or `ucp_checkout` is Required with UCP on, and so is one that keeps AI assistants off the store's pages, except `pages_public`: a store whose pages all need a login, such as a members-only store, chose that and can still be ready for AI assistants that sign in. It is Recommended: it shows in Store access without a badge and in Fix first under Needed to list products, and doesn't count toward the required steps or keep AI shopping from being turned on. A failing `ucp_endpoints_live` has no badge, like any failing check that isn't Required, and stays out of Fix first, since it can fail now and then with nothing changed on the store. While AI shopping is off, Store access notes that some checks only run when it is on; when the card has no other check to show, it says what turning AI shopping on checks instead, with a Turn on AI shopping button. A question card's badge counts its issues, says All passed, Couldn't check when nothing failed but a check tried to run and couldn't, or Not checked yet while the checks wait for the merchant (the row says why). Issues are ranked by what they stop, then by sales: store checks that block `listing` (such as structured data) and product checks that keep products off a channel (`not_listable`), then product checks that only make products harder to find. Within each, the larger share of sales on the affected products comes first, then the larger product count, then page order. Without sales to compare, a product check's count is multiplied by the AI apps it affects, so 3 products kept out of 3 apps come before 5 products kept out of 1. Store checks with no sales link, such as a missing meta description, stay out of Fix first. `ProductSales` reads each product's net sales over the last 90 days from the Analytics lookup tables (`wc_order_product_lookup` joined with `wc_order_stats`), with the order statuses Analytics excludes left out and variations counted toward their parent and on their own. The scan adds up the sales of each check's failing products. A check a variable product fails through some of its variations (a missing price or GTIN, a missing variation image, or an option set to "any") adds only those variations' sales. An invalid GTIN, a GTIN shared with another product, and an image under 500 pixels still count the whole product's sales, which only changes the rank. The report stores each check's `sales_share` (0 to 1) and `sales` (`days`, `orders`, `imported`). While Analytics is off, `sales` is null. With fewer than `ProductSales::MIN_ORDERS` (20) orders in the period, too few to rank by, shares are null. They are null too while a store with at least 20 orders has under 90% of them in Analytics (`imported` false), as when past orders were never imported. Orders in several currencies are summed without conversion, as Analytics does. In both cases Fix first ranks by product count and AI apps, and says why. It says to start with the fixes that affect the most sales, over the period the figures cover, only when an issue on the card sold something; otherwise it says it ranks by product count. A share is rounded to 4 places and any sales keep at least 0.0001, so small sales never read as "No sales". A share is not shown once a check's count changes after the scan, since it was measured on the products failing then, but Fix first still ranks the check by it (`ranked_share`), so fixing one product doesn't move the issue down. Under headings for what each group stops (Required for AI shopping, Needed to list products, Helps shoppers find products), a product issue is badged by its share of sales ("38% of sales"); its line starts with the share, the first saying over which period ("38% of your sales in the last 90 days."); products that sold nothing in the period say "No sales" instead of 0%.
Tracks event: `agentic_commerce_ucp_toggled` (`enabled`), sent only when the store allows tracking.
diff --git a/plugins/woocommerce/src/Internal/AgentReadiness/ReadinessCheckPage.php b/plugins/woocommerce/src/Internal/AgentReadiness/ReadinessCheckPage.php
index 0df668bc018..97424520705 100644
--- a/plugins/woocommerce/src/Internal/AgentReadiness/ReadinessCheckPage.php
+++ b/plugins/woocommerce/src/Internal/AgentReadiness/ReadinessCheckPage.php
@@ -409,13 +409,15 @@ class ReadinessCheckPage implements RegisterHooksInterface {
* @return array{title:string,badge:array{intent:string,text:string}|null,text:string,button:array{href:string,text:string}}
*/
private function shopping_card( array $checks ): array {
- $enabled = UcpUtils::is_enabled();
- $left = count( self::open_steps( $checks ) );
+ $enabled = UcpUtils::is_enabled();
+ // As the Setup checklist's badge: the required steps while any is left, then the optional ones.
+ $required = count( array_filter( self::open_steps( $checks ), array( StoreConditions::class, 'shows_required' ) ) );
+ $left = $required > 0 ? $required : count( self::open_steps( $checks ) );
$badge = $this->shopping_badge( $checks );
$blocked = array() !== $this->store_conditions->failing_required( $checks );
$can_shop = $enabled && ! $blocked;
// As in the design: Continue setup while a required step is left, as the Setup checklist counts them, otherwise View settings.
- $button = array() !== array_filter( self::open_steps( $checks ), array( StoreConditions::class, 'shows_required' ) ) ? __( 'Continue setup', 'woocommerce' ) : __( 'View settings', 'woocommerce' );
+ $button = $required > 0 ? __( 'Continue setup', 'woocommerce' ) : __( 'View settings', 'woocommerce' );
$set_up = $enabled || false !== get_option( $this->features_controller->feature_enable_option_name( UcpUtils::FEATURE_ID ) );
if ( ! $set_up ) {
$text = __( 'Let shoppers find and buy your products through AI assistants.', 'woocommerce' );
@@ -1039,14 +1041,30 @@ class ReadinessCheckPage implements RegisterHooksInterface {
'link' => $item['link'],
);
}
+ // Count Required setup steps only, as the Setup checklist does. A step that blocks listing
+ // still joins when the rules file does not mark it Required, and a card with none of them
+ // keeps the ranking line. A scanned check is not a setup step and keeps that line too.
+ $setup_ids = array_column( array_filter( $checks, array( self::class, 'is_setup_step' ) ), 'id' );
+ $setup_only = array() === array_diff( array_column( $items, 'id' ), $setup_ids );
+ $required = $setup_only ? count( array_filter( $items, static fn( array $item ): bool => 0 === $item['tier'] ) ) : 0;
return array(
'title' => __( 'Fix first', 'woocommerce' ),
- 'ranking' => self::ranking_text( $report, $items ),
- 'link' => self::ranking_link( $report ),
+ 'ranking' => $required > 0 ? self::required_steps_summary( $required ) : self::ranking_text( $report, $items ),
+ 'link' => $required > 0 ? null : self::ranking_link( $report ),
'items' => $list,
);
}
+ /**
+ * How many required setup steps are left, as the Setup checklist and a Fix first card with only setup steps say it.
+ *
+ * @param int $required Number of failing required setup steps.
+ */
+ public static function required_steps_summary( int $required ): string {
+ /* translators: %d: number of failing required setup steps. */
+ return sprintf( _n( 'Finish %d required step to get your store ready for AI shopping.', 'Finish %d required steps to get your store ready for AI shopping.', $required, 'woocommerce' ), $required );
+ }
+
/**
* Where to go so Fix first can rank by sales: turn on Analytics (a report with a null `sales` key was read
* without it), or import past orders in Analytics settings.
@@ -1472,7 +1490,8 @@ class ReadinessCheckPage implements RegisterHooksInterface {
'id' => $id,
'title' => $group[0],
'badge' => self::badge_data( $cant && array() === $rows ? ( $waiting ? self::waiting_badge() : self::cant_check_badge() ) : self::group_badge( $checks, $waiting ) ),
- 'note' => $ucp_off && ! $ucp_only ? self::ucp_off_note() : ( 'understand' === $id ? self::sample_note( $report ) : null ),
+ // In coming soon mode the row says why nothing ran; the AI shopping note waits until the store is live.
+ 'note' => $ucp_off && ! $ucp_only && $launched ? self::ucp_off_note() : ( 'understand' === $id ? self::sample_note( $report ) : null ),
'channels' => array(),
'rows' => $cant ? array_merge( $rows, array( self::cant_check_row( $launched, $was_live ) ) ) : $rows,
'folded' => self::check_rows( array_values( $folded ), $launched, $was_live ),
diff --git a/plugins/woocommerce/src/Internal/AgentReadiness/StoreConditions.php b/plugins/woocommerce/src/Internal/AgentReadiness/StoreConditions.php
index 180f864fe0e..e6f2898b562 100644
--- a/plugins/woocommerce/src/Internal/AgentReadiness/StoreConditions.php
+++ b/plugins/woocommerce/src/Internal/AgentReadiness/StoreConditions.php
@@ -87,7 +87,7 @@ class StoreConditions {
'level' => self::LEVEL_REQUIRED,
'name' => __( 'Store is launched', 'woocommerce' ),
'label' => __( 'Store is in coming soon mode', 'woocommerce' ),
- 'why' => __( 'Visitors, crawlers and shopping agents see a holding page instead of your products.', 'woocommerce' ),
+ 'why' => __( 'Visitors, crawlers and AI assistants see a holding page instead of your products.', 'woocommerce' ),
'fix' => __( 'Launch the store under WooCommerce > Settings > Site visibility.', 'woocommerce' ),
'fix_url' => $settings_url( 'site-visibility' ),
),
@@ -112,7 +112,7 @@ class StoreConditions {
'level' => self::LEVEL_RECOMMENDED,
'name' => __( 'Universal Commerce Protocol (UCP) is on', 'woocommerce' ),
'label' => __( 'Universal Commerce Protocol (UCP) is off', 'woocommerce' ),
- 'why' => __( 'Shopping agents that use UCP cannot read your catalog.', 'woocommerce' ),
+ 'why' => __( 'AI assistants that use UCP cannot read your catalog.', 'woocommerce' ),
'fix' => __( 'Turn on "Allow AI assistants to shop your store" under WooCommerce > Settings > AI tools > AI shopping.', 'woocommerce' ),
'fix_url' => AgenticCommerceSettings::url( AgenticCommerceSettings::SHOPPING_SECTION ),
),
@@ -124,7 +124,7 @@ class StoreConditions {
'level' => self::LEVEL_REQUIRED,
'name' => __( 'Site uses HTTPS', 'woocommerce' ),
'label' => __( 'Site does not use HTTPS', 'woocommerce' ),
- 'why' => __( 'Agents only send shoppers to a secure checkout.', 'woocommerce' ),
+ 'why' => __( 'AI assistants only send shoppers to a secure checkout.', 'woocommerce' ),
'fix' => __( 'Move the site to HTTPS; your hosting provider can usually turn it on.', 'woocommerce' ),
'fix_url' => wp_get_update_https_url(),
),
@@ -132,30 +132,30 @@ class StoreConditions {
$policy_page(
'privacy_page',
AgenticCommerceSettings::PRIVACY_PAGE_OPTION,
- __( 'Privacy policy page is selected', 'woocommerce' ),
+ __( 'Privacy policy page is selected and published', 'woocommerce' ),
__( 'No privacy policy page', 'woocommerce' ),
- __( 'Agents will be able to link shoppers to your privacy policy before they buy.', 'woocommerce' )
+ __( 'AI assistants will be able to link shoppers to your privacy policy before they buy.', 'woocommerce' )
),
$policy_page(
'terms_page',
AgenticCommerceSettings::TERMS_PAGE_OPTION,
- __( 'Terms and conditions page is selected', 'woocommerce' ),
+ __( 'Terms and conditions page is selected and published', 'woocommerce' ),
__( 'No terms and conditions page', 'woocommerce' ),
- __( 'Agents will be able to link shoppers to your terms before they buy.', 'woocommerce' )
+ __( 'AI assistants will be able to link shoppers to your terms before they buy.', 'woocommerce' )
),
$policy_page(
'refund_returns_page',
AgenticCommerceSettings::REFUND_RETURNS_PAGE_OPTION,
- __( 'Refund and returns page is selected', 'woocommerce' ),
+ __( 'Refund and returns page is selected and published', 'woocommerce' ),
__( 'No refund and returns page', 'woocommerce' ),
- __( 'Agents will be able to link shoppers to your return terms before they buy.', 'woocommerce' )
+ __( 'AI assistants will be able to link shoppers to your return terms before they buy.', 'woocommerce' )
),
$policy_page(
'shipping_policy_page',
AgenticCommerceSettings::SHIPPING_POLICY_PAGE_OPTION,
- __( 'Shipping policy page is selected', 'woocommerce' ),
+ __( 'Shipping policy page is selected and published', 'woocommerce' ),
__( 'No shipping policy page', 'woocommerce' ),
- __( 'Shoppers ask agents about delivery times and costs.', 'woocommerce' )
+ __( 'Shoppers ask AI assistants about delivery times and costs.', 'woocommerce' )
),
array(
'id' => 'payment_method',
@@ -165,7 +165,7 @@ class StoreConditions {
'level' => self::LEVEL_RECOMMENDED,
'name' => __( 'A payment method is turned on', 'woocommerce' ),
'label' => __( 'No payment method is turned on', 'woocommerce' ),
- 'why' => __( 'Shoppers sent by an agent cannot pay for their order.', 'woocommerce' ),
+ 'why' => __( 'Shoppers sent by an AI assistant cannot pay for their order.', 'woocommerce' ),
'fix' => __( 'Turn on a payment method under WooCommerce > Settings > Payments.', 'woocommerce' ),
'fix_url' => $settings_url( 'checkout' ),
),
@@ -177,7 +177,7 @@ class StoreConditions {
'level' => self::LEVEL_RECOMMENDED,
'name' => __( 'Guest checkout is allowed', 'woocommerce' ),
'label' => __( 'Guest checkout is off', 'woocommerce' ),
- 'why' => __( 'With guest checkout off, an AI assistant can check out only when the shopper creates an account at checkout. If account creation at checkout is off too, it can\'t. It can still find your products and build carts.', 'woocommerce' ),
+ 'why' => __( 'With guest checkout off, AI assistants can’t check out for shoppers. They can still find your products and build carts.', 'woocommerce' ),
'fix' => __( 'Tick "Enable guest checkout" under WooCommerce > Settings > Accounts & Privacy.', 'woocommerce' ),
'fix_url' => $settings_url( 'account' ),
),
@@ -189,7 +189,7 @@ class StoreConditions {
'level' => self::LEVEL_RECOMMENDED,
'name' => __( 'Order confirmation emails are on', 'woocommerce' ),
'label' => __( 'Order confirmation emails are off', 'woocommerce' ),
- 'why' => __( 'Shoppers who buy through an agent get no confirmation from your store.', 'woocommerce' ),
+ 'why' => __( 'Shoppers who buy through an AI assistant get no confirmation from your store.', 'woocommerce' ),
'fix' => __( 'Turn on the Processing or Completed order email under WooCommerce > Settings > Emails.', 'woocommerce' ),
'fix_url' => $settings_url( 'email§ion=wc_email_customer_processing_order' ),
),
diff --git a/plugins/woocommerce/src/Internal/AgentReadiness/StoreOutputChecks.php b/plugins/woocommerce/src/Internal/AgentReadiness/StoreOutputChecks.php
index 6ff56221c1a..61cfe70f6eb 100644
--- a/plugins/woocommerce/src/Internal/AgentReadiness/StoreOutputChecks.php
+++ b/plugins/woocommerce/src/Internal/AgentReadiness/StoreOutputChecks.php
@@ -273,7 +273,7 @@ class StoreOutputChecks {
'blocks' => 'discovery',
'name' => __( 'Product structured data comes from WooCommerce, once', 'woocommerce' ),
'label' => __( 'Something replaces or repeats WooCommerce\'s product structured data', 'woocommerce' ),
- 'why' => __( 'Agents may read values that differ from your product, or two versions of it.', 'woocommerce' ),
+ 'why' => __( 'AI assistants may read values that differ from your product, or two versions of it.', 'woocommerce' ),
'fix' => __( 'Usually an SEO plugin or your theme. Check its schema settings; if you chose this, you can ignore it.', 'woocommerce' ),
'fix_url' => '',
'conflict' => true,
@@ -286,7 +286,7 @@ class StoreOutputChecks {
'blocks' => 'discovery',
'name' => __( 'Product structured data has a name and image', 'woocommerce' ),
'label' => __( 'Product structured data is missing a name or image', 'woocommerce' ),
- 'why' => __( 'Without these, agents and search engines can\'t show the product.', 'woocommerce' ),
+ 'why' => __( 'Without these, AI assistants and search engines can\'t show the product.', 'woocommerce' ),
'fix' => __( 'Give the product a name and an image. If it has them, check the product schema settings in your SEO plugin.', 'woocommerce' ),
'fix_url' => '',
),
@@ -297,7 +297,7 @@ class StoreOutputChecks {
'blocks' => 'discovery',
'name' => __( 'Product offer has a price and stock status', 'woocommerce' ),
'label' => __( 'Product offer is missing a price or stock status', 'woocommerce' ),
- 'why' => __( 'Agents compare price and availability before they suggest a product.', 'woocommerce' ),
+ 'why' => __( 'AI assistants compare price and availability before they suggest a product.', 'woocommerce' ),
'fix' => __( 'Set a price and stock status on the product. If they\'re set, check the product schema settings in your SEO plugin.', 'woocommerce' ),
'fix_url' => '',
),
@@ -308,7 +308,7 @@ class StoreOutputChecks {
'blocks' => 'discovery',
'name' => __( 'Store serves an llms.txt file', 'woocommerce' ),
'label' => __( 'No llms.txt file', 'woocommerce' ),
- 'why' => __( 'llms.txt gives AI agents a short summary of your store and links to its main pages.', 'woocommerce' ),
+ 'why' => __( 'llms.txt gives AI assistants a short summary of your store and links to its main pages.', 'woocommerce' ),
'fix' => __( 'Turn on llms.txt in your SEO plugin, or add an llms.txt file to your site\'s root folder.', 'woocommerce' ),
'fix_url' => '',
),
@@ -319,7 +319,7 @@ class StoreOutputChecks {
'blocks' => 'discovery',
'name' => __( 'llms.txt starts with the store\'s name as a heading', 'woocommerce' ),
'label' => __( 'llms.txt doesn\'t follow the format', 'woocommerce' ),
- 'why' => __( 'The format asks for a "# Name" heading first; agents use it to know whose file they read.', 'woocommerce' ),
+ 'why' => __( 'The format asks for a "# Name" heading first; AI assistants use it to know whose file they read.', 'woocommerce' ),
'fix' => __( 'Start llms.txt with a line such as "# Your store name", in your SEO plugin or the file in your site\'s root folder.', 'woocommerce' ),
'fix_url' => '',
),
@@ -330,7 +330,7 @@ class StoreOutputChecks {
'blocks' => 'discovery',
'name' => __( 'Links in llms.txt open', 'woocommerce' ),
'label' => __( 'llms.txt links to pages that don\'t open', 'woocommerce' ),
- 'why' => __( 'Agents follow the links in llms.txt to read your store; a broken link wastes the visit.', 'woocommerce' ),
+ 'why' => __( 'AI assistants follow the links in llms.txt to read your store; a broken link wastes the visit.', 'woocommerce' ),
'fix' => __( 'Update or remove the broken links in llms.txt, in your SEO plugin or the file in your site\'s root folder.', 'woocommerce' ),
'fix_url' => '',
),
@@ -341,7 +341,7 @@ class StoreOutputChecks {
'blocks' => 'discovery',
'name' => __( 'Pages have Open Graph tags', 'woocommerce' ),
'label' => __( 'Pages are missing Open Graph tags', 'woocommerce' ),
- 'why' => __( 'Agents and social apps use og:title and og:image to show a page as a card with a picture.', 'woocommerce' ),
+ 'why' => __( 'AI assistants and social apps use og:title and og:image to show a page as a card with a picture.', 'woocommerce' ),
'fix' => __( 'WooCommerce adds them to product pages. For your home page, turn on Open Graph or social tags in your SEO plugin, or in Jetpack.', 'woocommerce' ),
'fix_url' => '',
),
@@ -363,7 +363,7 @@ class StoreOutputChecks {
'blocks' => 'discovery',
'name' => __( 'Product pages name their canonical URL', 'woocommerce' ),
'label' => __( 'Product pages don\'t name a canonical URL', 'woocommerce' ),
- 'why' => __( 'A product can be reached by several URLs; the canonical link tells agents which one to show.', 'woocommerce' ),
+ 'why' => __( 'A product can be reached by several URLs; the canonical link tells AI assistants which one to show.', 'woocommerce' ),
'fix' => __( 'WordPress adds a canonical link to product pages. If it\'s missing, a plugin or your theme is removing it.', 'woocommerce' ),
'fix_url' => '',
),
@@ -374,7 +374,7 @@ class StoreOutputChecks {
'blocks' => 'discovery',
'name' => __( 'Home page describes the store as an organization', 'woocommerce' ),
'label' => __( 'Home page has no organization structured data', 'woocommerce' ),
- 'why' => __( 'Organization JSON-LD gives agents your store\'s name, logo and contact details in one place.', 'woocommerce' ),
+ 'why' => __( 'Organization JSON-LD gives AI assistants your store\'s name, logo and contact details in one place.', 'woocommerce' ),
'fix' => __( 'Fill in your organization or business details in your SEO plugin.', 'woocommerce' ),
'fix_url' => '',
),
@@ -418,7 +418,7 @@ class StoreOutputChecks {
'blocks' => 'listing',
'name' => __( 'Store pages open without logging in', 'woocommerce' ),
'label' => __( 'Store pages ask visitors to sign in', 'woocommerce' ),
- 'why' => __( 'Agents don\'t sign in, so they can\'t read your home, shop or product pages.', 'woocommerce' ),
+ 'why' => __( 'AI assistants don\'t sign in, so they can\'t read your home, shop or product pages.', 'woocommerce' ),
'fix' => __( 'Check the membership, private store or maintenance plugin that asks visitors to sign in.', 'woocommerce' ),
'fix_url' => '',
),
@@ -440,7 +440,7 @@ class StoreOutputChecks {
'blocks' => 'discovery',
'name' => __( 'Home page links to a feed', 'woocommerce' ),
'label' => __( 'Home page doesn\'t link to a feed', 'woocommerce' ),
- 'why' => __( 'Some agents follow your RSS or Atom feed to see what is new.', 'woocommerce' ),
+ 'why' => __( 'Some AI assistants follow your RSS or Atom feed to see what is new.', 'woocommerce' ),
'fix' => __( 'Check whether your theme or a plugin removes the feed links WordPress adds.', 'woocommerce' ),
'fix_url' => '',
),
@@ -451,7 +451,7 @@ class StoreOutputChecks {
'blocks' => 'discovery',
'name' => __( 'Home and product pages set a viewport', 'woocommerce' ),
'label' => __( 'A home or product page has no viewport tag', 'woocommerce' ),
- 'why' => __( 'Browser agents load your pages at a phone or desktop size; without a viewport tag the layout can break.', 'woocommerce' ),
+ 'why' => __( 'AI assistants used in browsers load your pages at a phone or desktop size; without a viewport tag the layout can break.', 'woocommerce' ),
'fix' => __( 'Use a theme that adds a viewport meta tag, or ask its developer.', 'woocommerce' ),
'fix_url' => '',
),
@@ -462,7 +462,7 @@ class StoreOutputChecks {
'blocks' => 'discovery',
'name' => __( 'Home and product pages declare their language and encoding', 'woocommerce' ),
'label' => __( 'A home or product page doesn\'t declare its language or encoding', 'woocommerce' ),
- 'why' => __( 'Agents use the language to answer shoppers in theirs, and the encoding to read names and prices without garbled text.', 'woocommerce' ),
+ 'why' => __( 'AI assistants use the language to answer shoppers in theirs, and the encoding to read names and prices without garbled text.', 'woocommerce' ),
'fix' => __( 'Use a theme that sets the lang attribute and a charset meta tag, or ask its developer.', 'woocommerce' ),
'fix_url' => '',
),
@@ -473,7 +473,7 @@ class StoreOutputChecks {
'blocks' => 'discovery',
'name' => __( 'Images have alt text', 'woocommerce' ),
'label' => __( 'Some images have no alt text', 'woocommerce' ),
- 'why' => __( 'Agents that can\'t see images rely on alt text to know what a picture shows.', 'woocommerce' ),
+ 'why' => __( 'AI assistants that can\'t see images rely on alt text to know what a picture shows.', 'woocommerce' ),
'fix' => __( 'Add alt text to images in the media library and to product images. Images your theme adds need its developer.', 'woocommerce' ),
'fix_url' => admin_url( 'upload.php' ),
),
@@ -484,7 +484,7 @@ class StoreOutputChecks {
'blocks' => 'discovery',
'name' => __( 'Product pages have one main heading', 'woocommerce' ),
'label' => __( 'Product pages have no main heading, or more than one', 'woocommerce' ),
- 'why' => __( 'Agents read the H1 heading as the name of the product the page is about.', 'woocommerce' ),
+ 'why' => __( 'AI assistants read the H1 heading as the name of the product the page is about.', 'woocommerce' ),
'fix' => __( 'Check the product template of your theme or page builder: the product title should be the only H1.', 'woocommerce' ),
'fix_url' => '',
),
@@ -495,7 +495,7 @@ class StoreOutputChecks {
'blocks' => 'discovery',
'name' => __( 'Product structured data matches the product', 'woocommerce' ),
'label' => __( 'Product structured data shows a different name or price', 'woocommerce' ),
- 'why' => __( 'Agents quote the structured data, so shoppers may see a name or price your store doesn\'t charge.', 'woocommerce' ),
+ 'why' => __( 'AI assistants quote the structured data, so shoppers may see a name or price your store doesn\'t charge.', 'woocommerce' ),
'fix' => __( 'Usually an SEO plugin or your theme. Check its schema settings, or clear your page cache.', 'woocommerce' ),
'fix_url' => '',
'conflict' => true,
@@ -509,7 +509,7 @@ class StoreOutputChecks {
'blocks' => 'discovery',
'name' => __( 'Product structured data has a valid GTIN', 'woocommerce' ),
'label' => __( 'Product structured data has no valid GTIN', 'woocommerce' ),
- 'why' => __( 'Agents match products by GTIN, and the product page gives none or an invalid one.', 'woocommerce' ),
+ 'why' => __( 'AI assistants match products by GTIN, and the product page gives none or an invalid one.', 'woocommerce' ),
'fix' => __( 'WooCommerce adds the GTIN from the product\'s GTIN field. If it\'s filled in, an SEO plugin or your theme is likely replacing it: check its schema settings.', 'woocommerce' ),
'fix_url' => '',
'conflict' => true,
@@ -523,7 +523,7 @@ class StoreOutputChecks {
'blocks' => 'discovery',
'name' => __( 'Product structured data has a brand', 'woocommerce' ),
'label' => __( 'Product structured data has no brand', 'woocommerce' ),
- 'why' => __( 'Agents use the brand to match and compare products. Your product has one, but the page gives agents none.', 'woocommerce' ),
+ 'why' => __( 'AI assistants use the brand to match and compare products. Your product has one, but the page gives them none.', 'woocommerce' ),
'fix' => __( 'WooCommerce adds the product\'s brand. Usually an SEO plugin or your theme replaces it: check its schema settings.', 'woocommerce' ),
'fix_url' => '',
'conflict' => true,
@@ -536,7 +536,7 @@ class StoreOutputChecks {
'blocks' => 'discovery',
'name' => __( 'Product reviews are in structured data', 'woocommerce' ),
'label' => __( 'Product reviews are missing from structured data', 'woocommerce' ),
- 'why' => __( 'Agents compare ratings between stores; reviews only on the page are easy to miss.', 'woocommerce' ),
+ 'why' => __( 'AI assistants compare ratings between stores; reviews only on the page are easy to miss.', 'woocommerce' ),
'fix' => __( 'WooCommerce adds the rating to product structured data. Check whether your theme or an SEO plugin removes it.', 'woocommerce' ),
'fix_url' => '',
),
@@ -547,7 +547,7 @@ class StoreOutputChecks {
'blocks' => 'checkout',
'name' => __( 'Home page links to your privacy and returns pages', 'woocommerce' ),
'label' => __( 'Home page doesn\'t link to your privacy or returns page', 'woocommerce' ),
- 'why' => __( 'Agents look for policy links on the home page before they send a shopper to your checkout.', 'woocommerce' ),
+ 'why' => __( 'AI assistants look for policy links on the home page before they send a shopper to your checkout.', 'woocommerce' ),
'fix' => __( 'Add your privacy policy and refund and returns pages to the footer or a menu.', 'woocommerce' ),
'fix_url' => '',
),
@@ -558,7 +558,7 @@ class StoreOutputChecks {
'blocks' => 'checkout',
'name' => __( 'Product structured data links your returns policy', 'woocommerce' ),
'label' => __( 'Product structured data has no returns policy', 'woocommerce' ),
- 'why' => __( 'Agents tell shoppers whether they can return an item before they buy, and read it from the product\'s structured data.', 'woocommerce' ),
+ 'why' => __( 'AI assistants tell shoppers whether they can return an item before they buy, and read it from the product\'s structured data.', 'woocommerce' ),
'fix' => __( 'Publish your refund and returns page and choose it under Store policies.', 'woocommerce' ),
'fix_url' => '',
),
@@ -569,7 +569,7 @@ class StoreOutputChecks {
'blocks' => 'checkout',
'name' => __( 'Product structured data gives shipping details', 'woocommerce' ),
'label' => __( 'Product structured data has no shipping details', 'woocommerce' ),
- 'why' => __( 'Agents tell shoppers the delivery options and cost before they buy.', 'woocommerce' ),
+ 'why' => __( 'AI assistants tell shoppers the delivery options and cost before they buy.', 'woocommerce' ),
'fix' => __( 'Add a shipping zone with a delivery method other than local pickup, so WooCommerce can add shipping details to your products. If you already have one, check whether your theme or an SEO plugin replaces WooCommerce\'s structured data.', 'woocommerce' ),
'fix_url' => admin_url( 'admin.php?page=wc-settings&tab=shipping' ),
),
@@ -580,7 +580,7 @@ class StoreOutputChecks {
'blocks' => 'checkout',
'name' => __( 'Product structured data says how to buy', 'woocommerce' ),
'label' => __( 'Product structured data has no buy action', 'woocommerce' ),
- 'why' => __( 'A BuyAction tells agents where to send a shopper to buy the product.', 'woocommerce' ),
+ 'why' => __( 'A BuyAction tells AI assistants where to send a shopper to buy the product.', 'woocommerce' ),
'fix' => __( 'Check whether another plugin replaces WooCommerce\'s product structured data.', 'woocommerce' ),
'fix_url' => '',
),
@@ -593,7 +593,7 @@ class StoreOutputChecks {
'blocks' => 'discovery',
'name' => __( 'Product pages keep WooCommerce\'s Open Graph tags', 'woocommerce' ),
'label' => __( 'Product pages are missing WooCommerce\'s Open Graph tags', 'woocommerce' ),
- 'why' => __( 'WooCommerce adds og:title and og:image to product pages, so agents and social apps can show the product as a card.', 'woocommerce' ),
+ 'why' => __( 'WooCommerce adds og:title and og:image to product pages, so AI assistants and social apps can show the product as a card.', 'woocommerce' ),
'fix' => __( 'Usually an SEO, social or caching plugin, or your theme, rewrites the page. Check their Open Graph settings.', 'woocommerce' ),
'fix_url' => '',
'conflict' => true,
@@ -611,7 +611,7 @@ class StoreOutputChecks {
'blocks' => 'ucp',
'name' => __( 'Store serves its UCP profile', 'woocommerce' ),
'label' => __( 'UCP profile isn\'t served', 'woocommerce' ),
- 'why' => __( 'Agents read /.well-known/ucp to find your catalog. UCP is on, but visitors don\'t get the profile.', 'woocommerce' ),
+ 'why' => __( 'AI assistants read /.well-known/ucp to find your catalog. UCP is on, but visitors don\'t get the profile.', 'woocommerce' ),
'fix' => __( 'Save Settings > Permalinks to refresh the rules. If it still fails, ask your hosting provider whether caching or a firewall blocks /.well-known/ucp.', 'woocommerce' ),
'fix_url' => admin_url( 'options-permalink.php' ),
'conflict' => true,
@@ -625,7 +625,7 @@ class StoreOutputChecks {
/* translators: %s: UCP version, a date such as 2026-04-08. */
'name' => sprintf( __( 'UCP profile declares version %s', 'woocommerce' ), UcpUtils::VERSION ),
'label' => __( 'UCP profile declares a different version', 'woocommerce' ),
- 'why' => __( 'Agents use the version to know which requests your store accepts. A different version usually means another plugin serves its own UCP profile.', 'woocommerce' ),
+ 'why' => __( 'AI assistants use the version to know which requests your store accepts. A different version usually means another plugin serves its own UCP profile.', 'woocommerce' ),
'fix' => __( 'Look for another plugin that adds UCP or agentic commerce, and turn off its UCP profile.', 'woocommerce' ),
'fix_url' => admin_url( 'plugins.php' ),
'conflict' => true,
@@ -638,7 +638,7 @@ class StoreOutputChecks {
'blocks' => 'ucp',
'name' => __( 'UCP endpoint answers', 'woocommerce' ),
'label' => __( 'UCP endpoint is blocked or doesn\'t answer', 'woocommerce' ),
- 'why' => __( 'Agents search your catalog and build carts through this endpoint; when it\'s blocked they can\'t find your products.', 'woocommerce' ),
+ 'why' => __( 'AI assistants search your catalog and build carts through this endpoint; when it\'s blocked they can\'t find your products.', 'woocommerce' ),
'fix' => __( 'Ask your hosting provider or security plugin to allow requests to the WordPress REST API under /wp-json/wc/ucp/.', 'woocommerce' ),
'fix_url' => '',
);
@@ -649,7 +649,7 @@ class StoreOutputChecks {
'blocks' => 'ucp',
'name' => __( 'UCP profile offers checkout', 'woocommerce' ),
'label' => __( 'UCP profile doesn\'t offer checkout', 'woocommerce' ),
- 'why' => __( 'Agents build a cart and hand the shopper to your checkout through UCP checkout.', 'woocommerce' ),
+ 'why' => __( 'AI assistants build a cart and hand the shopper to your checkout through UCP checkout.', 'woocommerce' ),
'fix' => __( 'Look for another plugin that adds UCP or agentic commerce, and turn off its UCP profile.', 'woocommerce' ),
'fix_url' => admin_url( 'plugins.php' ),
);
diff --git a/plugins/woocommerce/src/Internal/AgentReadiness/SupportReport.php b/plugins/woocommerce/src/Internal/AgentReadiness/SupportReport.php
index 976f83b7e69..d1ad0e27ddc 100644
--- a/plugins/woocommerce/src/Internal/AgentReadiness/SupportReport.php
+++ b/plugins/woocommerce/src/Internal/AgentReadiness/SupportReport.php
@@ -91,11 +91,11 @@ class SupportReport {
}
/**
- * File name for the download, like the System Status Report's: AISalesReadiness_<site host>_<date and time>.txt.
+ * File name for the download, like the System Status Report's: AIShoppingHealth_<site host>_<date and time>.txt.
*/
public function filename(): string {
$host = (string) wp_parse_url( home_url(), PHP_URL_HOST );
- return sanitize_file_name( 'AISalesReadiness_' . ( '' !== $host ? $host : 'site' ) . '_' . gmdate( 'Y-m-d\TH-i-s' ) . '.txt' );
+ return sanitize_file_name( 'AIShoppingHealth_' . ( '' !== $host ? $host : 'site' ) . '_' . gmdate( 'Y-m-d\TH-i-s' ) . '.txt' );
}
/**
@@ -110,7 +110,7 @@ class SupportReport {
$lines = array_merge(
$this->header( $report, $pending ),
array( '' ),
- $this->shopping( $report ),
+ $this->shopping( $report, $live ),
array( '' ),
$this->store_checks( $report, $live )
);
@@ -137,7 +137,7 @@ class SupportReport {
$state = null === $report ? 'Not checked yet' : 'Finished';
}
$lines = array(
- '### AI sales readiness ###',
+ '### AI shopping health ###',
'',
'Site: ' . home_url(),
'WooCommerce version: ' . (string) Constants::get_constant( 'WC_VERSION' ),
@@ -153,16 +153,18 @@ class SupportReport {
? sprintf( 'Checked %s products: bestsellers first, then the most recently changed.', ProductScan::PRODUCT_LIMIT )
: sprintf( 'Checked the %s products you changed most recently.', ProductScan::PRODUCT_LIMIT ) );
}
+ $lines[] = 'Daily checks: ' . ( ScheduledScan::daily_enabled() ? 'On' : 'Off' );
return $lines;
}
/**
* The UCP switch, store visibility and product visibility.
*
- * @param array<string, mixed>|null $report Stored report.
+ * @param array<string, mixed>|null $report Stored report.
+ * @param array<int, array{id:string,ok:bool,blocks:string,level:string,name:string,label:string,why:string,fix:string,fix_url:string}> $live Store conditions read now.
* @return string[]
*/
- private function shopping( ?array $report ): array {
+ private function shopping( ?array $report, array $live ): array {
$statuses = array(
UcpSwitch::STATUS_ACTIVE => 'On',
UcpSwitch::STATUS_NEEDS_ATTENTION => 'On, with required steps left',
@@ -175,10 +177,15 @@ class SupportReport {
} else {
$visibility = 'Live';
}
+ // As the page's Needs attention badge: a step shown as Required is left, whether or not it blocks the switch.
+ $status = $this->ucp_switch->status();
+ if ( UcpSwitch::STATUS_ACTIVE === $status && 'check' === $this->readiness_page->shopping_badge( $live )[0] ) {
+ $status = UcpSwitch::STATUS_NEEDS_ATTENTION;
+ }
$lines = array(
'### AI shopping ###',
'',
- 'AI shopping: ' . ( $statuses[ $this->ucp_switch->status() ] ?? '' ),
+ 'AI shopping: ' . ( $statuses[ $status ] ?? '' ),
'Store visibility: ' . $visibility,
);
if ( null !== $report ) {
@@ -304,6 +311,11 @@ class SupportReport {
);
}
$lines[] = '';
+ // With nothing checked, a count of 0 is not a pass; the page says there are no products too.
+ if ( isset( $report['products'] ) && 0 === (int) $report['products'] ) {
+ $lines[] = 'No products to check.';
+ return $lines;
+ }
foreach ( is_array( $report['checks'] ?? null ) ? $report['checks'] : array() as $check ) {
if ( ! is_array( $check ) || ! isset( $check['id'] ) ) {
continue;
diff --git a/plugins/woocommerce/tests/php/src/Internal/AgentReadiness/AgenticCommerceSettingsTest.php b/plugins/woocommerce/tests/php/src/Internal/AgentReadiness/AgenticCommerceSettingsTest.php
index 6994fa0a547..a69247863c5 100644
--- a/plugins/woocommerce/tests/php/src/Internal/AgentReadiness/AgenticCommerceSettingsTest.php
+++ b/plugins/woocommerce/tests/php/src/Internal/AgentReadiness/AgenticCommerceSettingsTest.php
@@ -13,6 +13,7 @@ use Automattic\WooCommerce\Internal\AgentReadiness\ReadinessRule;
use Automattic\WooCommerce\Internal\AgentReadiness\RemoteRules;
use Automattic\WooCommerce\Internal\AgentReadiness\ScheduledScan;
use Automattic\WooCommerce\Internal\AgentReadiness\StoreConditions;
+use Automattic\WooCommerce\Internal\AgentReadiness\SupportReport;
use WC_Admin_Settings;
use WC_Helper_Product;
use WC_Unit_Test_Case;
@@ -300,7 +301,7 @@ class AgenticCommerceSettingsTest extends WC_Unit_Test_Case {
}
/**
- * @testdox The page shows the three counts from the stored report, the switch and failing checks.
+ * @testdox The page shows the three catalog counts as they stand now, the switch and failing checks.
*/
public function test_output_with_report_and_failing_checks(): void {
remove_all_filters( 'pre_option_home' );
@@ -319,7 +320,30 @@ class AgenticCommerceSettingsTest extends WC_Unit_Test_Case {
$stored['products'] = ProductScan::PRODUCT_LIMIT;
$stored['available'] = 8400;
update_option( AgentReadiness::REPORT_OPTION, $stored );
- $this->assertSame( '8,400', array_column( $this->shopping()['visibility']['counts'], 'count', 'id' )[ ProductScan::COUNT_AVAILABLE ], 'The whole catalog, like the other two, not only the products the scan stopped at' );
+ WC_Helper_Product::create_simple_product();
+ $hidden = WC_Helper_Product::create_simple_product();
+ $hidden->set_catalog_visibility( 'hidden' );
+ $hidden->save();
+ $now = array_column( $this->shopping()['visibility']['counts'], 'count', 'id' );
+ $this->assertSame( '2', $now[ ProductScan::COUNT_AVAILABLE ], 'Counted now, as the list the card links to: a product added since the last check counts, whatever the stored report says' );
+ $this->assertSame( '1', $now[ ProductScan::COUNT_HIDDEN ] );
+ $this->assertSame( '1', $now[ ProductScan::COUNT_UNSUPPORTED ] );
+ $expected_counts = array(
+ ProductScan::COUNT_AVAILABLE => 2,
+ ProductScan::COUNT_HIDDEN => 1,
+ ProductScan::COUNT_UNSUPPORTED => 1,
+ );
+ foreach ( $expected_counts as $count => $expected ) {
+ $listed = new \WP_Query(
+ array(
+ 'post_type' => 'product',
+ 'post_status' => 'publish',
+ 'fields' => 'ids',
+ 'tax_query' => ProductScan::count_query( $count ), // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_tax_query
+ )
+ );
+ $this->assertSame( $expected, $listed->found_posts, 'The list the ' . $count . ' card links to has as many products as the card says' );
+ }
$this->assertSame( '1', $counts[ ProductScan::COUNT_UNSUPPORTED ]['count'] );
$this->assertMatchesRegularExpression( "#^AI assistants can find these products, but shoppers can't buy them through an assistant yet\\.#", $counts[ ProductScan::COUNT_UNSUPPORTED ]['tip'], 'The tip says what not supported means' );
$this->assertSame( '', $counts[ ProductScan::COUNT_AVAILABLE ]['tip'], 'Visible needs no tip' );
@@ -436,6 +460,26 @@ class AgenticCommerceSettingsTest extends WC_Unit_Test_Case {
);
}
+ /**
+ * @testdox With a required and an optional step left, the card, the Setup checklist and the support download count the required one.
+ */
+ public function test_required_step_left_reads_the_same_everywhere(): void {
+ $this->make_every_step_pass();
+ $this->turn_off_order_emails();
+ update_option( 'woocommerce_enable_guest_checkout', 'no' );
+
+ $shopping = $this->shopping( true );
+ $this->assertSame( array(), wc_get_container()->get( StoreConditions::class )->failing_required(), 'Order emails are shown as Required and don\'t block the switch' );
+ $this->assertSame( '1 step left', $shopping['checklist']['badge']['text'] );
+ $this->assertSame( 'AI assistants can shop your store. 1 step left.', $this->view()['overview']['shopping']['text'], 'The card counts what the checklist badge counts, not the optional step too' );
+ $this->assertStringContainsString( "\nAI shopping: On, with required steps left\n", wc_get_container()->get( SupportReport::class )->text(), 'As the page\'s Needs attention badge' );
+
+ foreach ( array( 'WC_Email_Customer_Processing_Order', 'WC_Email_Customer_Completed_Order' ) as $email ) {
+ WC()->mailer()->get_emails()[ $email ]->enabled = 'yes';
+ }
+ $this->assertStringContainsString( "\nAI shopping: On\n", wc_get_container()->get( SupportReport::class )->text(), 'With only the optional step left' );
+ }
+
/**
* @testdox The AI shopping card and the Setup checklist follow the design in each scenario: $_dataName.
* @dataProvider provider_shopping_scenarios
@@ -1619,6 +1663,9 @@ class AgenticCommerceSettingsTest extends WC_Unit_Test_Case {
$this->assertSame( 'Some checks only run when AI shopping is on, like whether AI assistants can connect to your store and send shoppers to your checkout.', $access['note'] );
$this->assertNull( $access['empty'] );
$this->assertCount( 2, $access['folded'], 'The passed checks stay, as in the design' );
+
+ update_option( 'woocommerce_coming_soon', 'yes' );
+ $this->assertNull( array_column( $this->view()['sections'], null, 'id' )['access']['note'], 'In coming soon mode the store has to go live first, so the AI shopping note waits' );
}
/**
@@ -1867,10 +1914,14 @@ class AgenticCommerceSettingsTest extends WC_Unit_Test_Case {
$this->assertSame( 'Required for AI shopping', $items['payment_method']['tier'] );
$this->assertSame( 'Required for AI shopping', $items['order_emails']['tier'] );
$this->assertSame( array(), wc_get_container()->get( StoreConditions::class )->failing_required(), 'None blocks the switch' );
+ $fix_first = $this->view()['fix_first'];
+ $this->assertSame( 'Finish 3 required steps to get your store ready for AI shopping.', $fix_first['ranking'], 'With only setup steps nothing is ranked, so the card counts them as the Setup checklist does' );
+ $this->assertNull( $fix_first['link'], 'and offers no way to rank by sales' );
update_option( 'woocommerce_enable_guest_checkout', 'no' );
$shopping = $this->shopping();
$this->assertStringStartsWith( 'Finish 3 required steps', $shopping['checklist']['summary'] );
+ $this->assertSame( '3 steps left', $shopping['checklist']['badge']['text'], 'The badge counts the required steps, as the summary does, not the optional one too' );
$this->assertSame( array( 'payment_method', 'search_visible', 'order_emails', 'guest_checkout' ), array_column( $shopping['checklist']['steps'], 'id' ), 'They come before the optional guest checkout step' );
$this->assertSame( array( 'required', 'required', 'required', 'open' ), array_column( $shopping['checklist']['steps'], 'state' ), 'All three stay Required (WOOAI-1681)' );
foreach ( array(
@@ -1885,6 +1936,51 @@ class AgenticCommerceSettingsTest extends WC_Unit_Test_Case {
$this->assertFalse( $shopping['ucp']['blocked'], 'None keeps the switch from being turned on' );
}
+ /**
+ * @testdox A setup-only Fix first card counts the Required steps, and keeps the ranking line when the rules file marks the only one optional.
+ */
+ public function test_fix_first_setup_line_counts_required_steps_only(): void {
+ $this->make_every_step_pass();
+ update_option( 'blog_public', '0' );
+ foreach ( WC()->payment_gateways()->payment_gateways() as $gateway ) {
+ $this->restore[] = array( $gateway, $gateway->enabled );
+ $gateway->enabled = 'no';
+ }
+ update_option(
+ RemoteRules::OPTION,
+ array(
+ 'store_checks' => array(
+ 'search_visible' => array( 'required' => false ),
+ ),
+ ),
+ false
+ );
+ update_option(
+ AgentReadiness::REPORT_OPTION,
+ array(
+ 'generated_at' => gmdate( 'c' ),
+ 'store_checks' => array(),
+ 'sales' => null,
+ ),
+ false
+ );
+
+ $fix_first = $this->view()['fix_first'];
+ $items = array_column( $fix_first['items'], null, 'id' );
+ $this->assertSame( 'Finish 1 required step to get your store ready for AI shopping.', $fix_first['ranking'], 'The optional search step is on the card and is not counted' );
+ $this->assertNull( $fix_first['link'], 'The required-steps line has no ranking link' );
+ $this->assertSame( 'Required', $items['payment_method']['badge']['text'] );
+ $this->assertNull( $items['search_visible']['badge'], 'The rules file left this step off the Required list' );
+ $this->assertStringStartsWith( 'Finish 1 required step', $this->shopping()['checklist']['summary'] );
+
+ $this->make_every_step_pass();
+ update_option( 'blog_public', '0' );
+ $fix_first = $this->view()['fix_first'];
+ $this->assertSame( array( 'search_visible' ), array_column( $fix_first['items'], 'id' ) );
+ $this->assertSame( 'Start with the fixes that affect the most products.', $fix_first['ranking'], 'No required step is left, so the card does not say to finish required steps' );
+ $this->assertSame( 'Turn on Analytics to see which fixes affect the most sales.', $fix_first['link']['text'] );
+ }
+
/**
* @testdox Order confirmation emails that are off are Required in Fix first and the Setup checklist, not in the buying card, ahead of every sale-ranked issue, with AI shopping on or off and with or without sales, and never keep AI shopping from being turned on.
*
@@ -2013,6 +2109,7 @@ class AgenticCommerceSettingsTest extends WC_Unit_Test_Case {
$view = $this->view();
$items = array_column( $view['fix_first']['items'], 'tier', 'id' );
$this->assertSame( 'Required for AI shopping', $items['ucp_profile'] );
+ $this->assertStringStartsNotWith( 'Finish', $view['fix_first']['ranking'], 'A required check the scan read is not a setup step, so the card keeps its ranking line' );
$this->assertArrayNotHasKey( 'ucp_endpoints_live', $items, 'Catalog search can fail now and then with nothing changed, so it is not Required' );
$this->assertArrayNotHasKey( 'ucp_profile_version', $items, 'A different version is likely another plugin, not a blocker' );
$rows = array_column( array_column( $view['sections'], null, 'id' )['access']['rows'], null, 'id' );
diff --git a/plugins/woocommerce/tests/php/src/Internal/AgentReadiness/ReadinessRestControllerTest.php b/plugins/woocommerce/tests/php/src/Internal/AgentReadiness/ReadinessRestControllerTest.php
index 10f790d03b8..e617d926163 100644
--- a/plugins/woocommerce/tests/php/src/Internal/AgentReadiness/ReadinessRestControllerTest.php
+++ b/plugins/woocommerce/tests/php/src/Internal/AgentReadiness/ReadinessRestControllerTest.php
@@ -144,10 +144,14 @@ class ReadinessRestControllerTest extends WC_REST_Unit_Test_Case {
$data = $response->get_data();
$this->assertSame( 200, $response->get_status() );
- $this->assertMatchesRegularExpression( '/^AISalesReadiness_[a-z0-9.-]+_\d{4}-\d{2}-\d{2}T\d{2}-\d{2}-\d{2}\.txt$/', $data['filename'] );
+ $this->assertMatchesRegularExpression( '/^AIShoppingHealth_[a-z0-9.-]+_\d{4}-\d{2}-\d{2}T\d{2}-\d{2}-\d{2}\.txt$/', $data['filename'] );
$this->assertStringContainsString( 'Site: ' . home_url(), $data['text'] );
$this->assertStringContainsString( 'WooCommerce version: ' . WC_VERSION, $data['text'] );
$this->assertStringContainsString( 'Last checked: Not checked yet', $data['text'] );
+ $this->assertStringContainsString( "\nDaily checks: On\n", $data['text'], 'Support sees whether the store is checked each day' );
+ update_option( ScheduledScan::DAILY_OPTION, 'no' );
+ $this->assertStringContainsString( "\nDaily checks: Off\n", $this->server->dispatch( new WP_REST_Request( 'GET', '/wc/v3/agent-readiness/support-report' ) )->get_data()['text'] );
+ delete_option( ScheduledScan::DAILY_OPTION );
$this->assertStringContainsString( "AI shopping: Off\nStore visibility: Live", $data['text'] );
$this->assertStringContainsString( "### Store checks ###\n\nNot checked yet", $data['text'] );
$this->assertStringContainsString( '(launched)', $data['text'], 'Setup steps are read now, so they show before the first check.' );
@@ -155,6 +159,35 @@ class ReadinessRestControllerTest extends WC_REST_Unit_Test_Case {
$this->assertFalse( as_has_scheduled_action( ScheduledScan::RUN_NOW_HOOK ), 'The download must not queue a check.' );
}
+ /**
+ * @testdox The support report is named after the page, and with no products checked it says so instead of marking every product check passed.
+ */
+ public function test_support_report_with_no_products(): void {
+ update_option(
+ AgentReadiness::REPORT_OPTION,
+ array(
+ 'generated_at' => '2026-11-18T10:42:00+00:00',
+ 'products' => 0,
+ 'store_checks' => array(),
+ 'checks' => array(
+ array(
+ 'id' => 'missing_images',
+ 'label' => 'Products with no main image',
+ 'count' => 0,
+ ),
+ ),
+ ),
+ false
+ );
+ $text = $this->server->dispatch( new WP_REST_Request( 'GET', '/wc/v3/agent-readiness/support-report' ) )->get_data()['text'];
+
+ $this->assertStringStartsWith( "### AI shopping health ###\n", $text );
+ $this->assertStringEndsWith( "\nNo products to check.\n", $text, 'After the Product checks heading and the app totals' );
+ $this->assertStringNotContainsString( 'missing_images', $text, 'A count of 0 with nothing checked is not a pass' );
+ $privacy = array_values( array_filter( explode( "\n", $text ), static fn( string $line ): bool => false !== strpos( $line, '(privacy_page)' ) ) );
+ $this->assertStringStartsWith( 'Privacy policy page is selected and published (privacy_page):', $privacy[0] ?? '', 'The step is done only once the page is published' );
+ }
+
/**
* @testdox The support report lists each check with its status and what was found, product counts with their IDs, and hides a same-cause check.
*/
diff --git a/plugins/woocommerce/tests/php/src/Internal/AgentReadiness/StoreConditionsTest.php b/plugins/woocommerce/tests/php/src/Internal/AgentReadiness/StoreConditionsTest.php
index e374de4c0b4..def70254c9e 100644
--- a/plugins/woocommerce/tests/php/src/Internal/AgentReadiness/StoreConditionsTest.php
+++ b/plugins/woocommerce/tests/php/src/Internal/AgentReadiness/StoreConditionsTest.php
@@ -5,6 +5,7 @@ namespace Automattic\WooCommerce\Tests\Internal\AgentReadiness;
use Automattic\WooCommerce\Internal\AgentReadiness\AgenticCommerceSettings;
use Automattic\WooCommerce\Internal\AgentReadiness\StoreConditions;
+use Automattic\WooCommerce\Internal\AgentReadiness\StoreOutputChecks;
use Automattic\WooCommerce\Internal\Ucp\UcpDiscovery;
use WC_Unit_Test_Case;
@@ -137,6 +138,7 @@ class StoreConditionsTest extends WC_Unit_Test_Case {
$this->assertFalse( $checks['guest_checkout']['ok'] );
$this->assertSame( StoreConditions::LEVEL_RECOMMENDED, $checks['guest_checkout']['level'] );
$this->assertFalse( StoreConditions::shows_required( $checks['guest_checkout'] ), 'AI assistants can still build carts without guest checkout' );
+ $this->assertSame( 'With guest checkout off, AI assistants can’t check out for shoppers. They can still find your products and build carts.', $checks['guest_checkout']['why'], 'Creating an account at checkout doesn\'t help: the store serves no checkout to assistants' );
}
/**
@@ -326,4 +328,16 @@ class StoreConditionsTest extends WC_Unit_Test_Case {
}
}
}
+
+ /**
+ * @testdox The texts in the report call them AI assistants, as the pages do.
+ */
+ public function test_report_texts_say_ai_assistants(): void {
+ StoreOutputChecksTest::block_requests();
+ $checks = array_merge( wc_get_container()->get( StoreConditions::class )->all(), wc_get_container()->get( StoreOutputChecks::class )->all() );
+ $this->assertGreaterThan( 30, count( $checks ) );
+ foreach ( $checks as $check ) {
+ $this->assertDoesNotMatchRegularExpression( '/\\bagents?\\b/i', (string) ( $check['why'] ?? '' ), $check['id'] );
+ }
+ }
}