Skip to main content
WooCommerce Shortcuts 5.1 registers one read-only ability in the mainwp-woocommerce-shortcuts category. It uses the mainwp/ namespace on your MainWP Dashboard.

What You’ll Learn

  • Read one site’s cached WooCommerce detection state
  • Distinguish inactive WooCommerce from unavailable data
  • Interpret freshness and synchronization timestamps

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 example below
  • WooCommerce Shortcuts 5.1 or later, active in MainWP Dashboard
  • An authenticated user with manage_options
  • Access to the WooCommerce Shortcuts Add-on, the selected site, and the Jump to WP Admin operation
Team Control restrictions apply. The ability checks the same extension and Child site WordPress admin operation permissions used by the shortcut widget, as well as the user’s allowed sites and permission for the exact selected site. Read-only access does not bypass those checks. Use an Application Password or the authentication methods in the Abilities API overview. The examples use an Application Password.

Available Ability

Discover the ability and its full input and output schemas:
The ability is marked readonly: true, destructive: false, and idempotent: true.

Read Cached WooCommerce Status

Ability: mainwp/get-woocommerce-shortcuts-status-v1
Method: GET
The only input is the required site_id, identifying the MainWP site. Supply a positive JSON integer such as 1. Canonical decimal strings such as "1" are also normalized to a site ID. Domains, URLs, zero, negative values, leading-zero strings, decimal or exponent strings, booleans, and extra properties are not accepted.
Example response for an active cached installation:
The response contains only these five fields. It does not expose the Child URL, plugin inventory, shortcut links, or authentication nonces.

Interpret the State

inactive does not distinguish a deactivated plugin from an absent plugin. unknown does not mean WooCommerce is uninstalled. The widget shows WooCommerce not detected for inactive and WooCommerce status unavailable for unknown.

Interpret Freshness

The missing fallback can also cover a stale or failed synchronization before the first detection record exists. Do not assume missing proves the site has never been synced. Example response when no trustworthy observation is available:

Cached Data After Upgrades and Selective Sync

Before the first sync after upgrading to 5.1, the ability can derive status from the existing stored plugin inventory. When that fallback passes validation, both observed_at and synced_at use the cached site’s sync timestamp. Reading the fallback does not create a detection record. When the Installed plugins sync item is disabled, subsequent syncs can retain detection from the stored inventory. A fresh result describes validation against the cached inventory and site sync time; it does not establish that the plugin inventory was fetched again during that sync. To verify a later WooCommerce installation or activation change, enable Installed plugins under Select data to sync in MainWP Dashboard settings, sync the site, then read the status again.
This ability reads MainWP Dashboard’s cached data. It does not contact the Child site, schedule or perform a sync, write settings, open WordPress admin, or manage WooCommerce orders and products. An active result does not prove that a live storefront or admin screen is reachable.

Handle Errors

Unavailable cached status is returned as a successful response with state: unknown. Authentication, authorization, input, site resolution, and missing runtime errors are separate request failures. WordPress can reject invalid input against the public schema before the Add-on callback runs. MainWP Dashboard also supplies its authentication and general permission errors, including HTTP 401 for unauthenticated requests and HTTP 403 for insufficient Dashboard permissions.