Letting an AI assistant read your POP invoices (WordPress Abilities and WP-CLI)

Integrationswordpress2026-07-31

Goal

Let an AI assistant connected to your WordPress site (or a command-line script) search invoices and credit notes already generated by POP on WooCommerce, Paid Memberships Pro, or Paid Member Subscriptions, and retrieve their XML, PDF, or structured data — without granting direct access to the database or the filesystem.

This is a different mechanism from POP’s hosted MCP server (see mcp and mcp-remote): that one talks to the POP Cloud API and creates new documents for any platform; this one works locally on your own WordPress site, on orders your store has already invoiced, and doesn’t generate anything new — it only serves already-cached documents.

Prerequisites

What it exposes

Four abilities, category pop:

Steps

AI assistant path (Abilities/MCP)

  1. Install and activate the Abilities API and MCP Adapter plugins on the WordPress site, in addition to pop-wordpress.
  2. Connect your AI assistant to the site’s MCP server (address and authentication depend on the installed MCP Adapter plugin).
  3. Ask your assistant something like “Find July invoices for customer Smith”: the assistant uses pop/search-invoices, then pop/get-invoice-data/xml/pdf on the document it found.

By default, every ability requires the WordPress manage_options capability (filterable via wc_el_inv-abilities-capability), because it’s reachable over HTTP.

WP-CLI path

wp popapi invoice search --customer="Smith" --date_from=2026-07-01
wp popapi invoice get <document_id> --provider=woocommerce
wp popapi invoice xml <document_id> --raw
wp popapi invoice pdf <document_id>

WP-CLI commands do not enforce the manage_options gate: shell/WP-CLI access to the site is already a stronger trust boundary than a WordPress capability, so no --user is required.

Verify

wp popapi invoice search --format=count should return a number consistent with invoiced orders on the site. On an existing document, wp popapi invoice get <id> --provider=<provider> should return structured data with no errors.

Common errors

To generate or send new documents from an AI assistant (not just retrieve existing ones), see mcp or mcp-remote, which work at the POP Cloud API level and don’t require extra WordPress plugins.