Skip to main content
These abilities require a WooCommerce Status release that includes Abilities API support. Earlier builds do not register them. Check ability discovery on your Dashboard before using these examples.
The Abilities-enabled WooCommerce Status release registers two read-only abilities in the mainwp-woocommerce-status category. Both use the mainwp/ namespace on your MainWP Dashboard. Use them to read the store figures shown on the WooCommerce Status page from an AI assistant or script. They return the data saved during the last sync. They do not sync, refresh, or contact Child sites.

What You’ll Learn

  • List the child sites that have stored WooCommerce Status data
  • Read one store’s last stored sales, order, stock, and top seller figures
  • Interpret missing optional fields and access errors

Prerequisites

  • WordPress 6.9 or later on the MainWP Dashboard site
  • MainWP Dashboard with Abilities API support; use version 6.2 or later for the input_json examples below
  • A WooCommerce Status build that registers these abilities, active on MainWP Dashboard
  • An authenticated user with manage_options and access to the WooCommerce Status Add-on
Use an Application Password or the authentication methods in the Abilities API overview. The examples use an Application Password. Team Control restrictions apply. The list leaves out sites you cannot access. Reading a single store you cannot access returns an error.

Available Abilities

Discover the abilities and their schemas:
Both abilities are marked readonly: true, destructive: false, and idempotent: true. They reject extra input properties.

List Stores

Ability: mainwp/list-woocommerce-stores-v1
Method: GET
This ability takes no input. Send no input, an empty object, or null.
Example response:
The list includes every accessible child site with a stored WooCommerce Status record, including sites where WooCommerce was inactive at the last sync. Use active to tell them apart. The list is not paginated and has no defined sort order.

Get Store Status

Ability: mainwp/get-woocommerce-store-status-v1
Method: GET
Example response:
The response contains the same fields as a list item. It can also include sales_last_7_days and top_seller, but only when the last sync stored them. A site with no stored WooCommerce Status record returns mainwp_site_not_found.

Response Fields

Counts that were not stored are returned as 0. Sales amounts are plain numbers; the response has no currency field. sales_last_7_days appears only when the last sync stored it. top_seller appears only when a stored top seller has a product name and a numeric quantity.
These abilities read the data saved on MainWP Dashboard during the last sync. Sync your sites first if you need current figures. The abilities do not return the raw stored payload, and they do not change stored data.

Error Handling

Standard authentication, schema, and method errors follow the Abilities API error reference. WooCommerce Status can also return: