Get PayPal order is a WordPress ability from WooCommerce PayPal Payments — usable via Easy MCP AI, which connects Claude, ChatGPT, and any AI assistant to your site.

Install Free Plugin →

Get PayPal order

Read-only
WooCommerce PayPal Payments Ecommerce woocommerce-paypal-payments/get-paypal-order

Look up a PayPal order's status and purchase-unit details by PayPal order ID or WooCommerce order ID.

Requires the WooCommerce PayPal Payments plugin with WooCommerce 10.9+ (which brings the Abilities API loader; implies WordPress 6.9+). Abilities are additionally gated behind the `woocommerce_paypal_payments_abilities_enabled` filter, which defaults to false, so a site admin or developer must explicitly enable it before any ability registers. Every ability requires the current user to have the 'manage_woocommerce' capability.

What it does

This ability looks up a PayPal order by either its PayPal v2 order ID (validated against an alphanumeric-uppercase pattern to block path-traversal payloads) or a WooCommerce order ID, resolving the PayPal ID from order meta when the latter is used. It calls the cached OrderEndpointCached::order() service and returns the order's id, intent, status, purchase units with embedded captures/authorizations/refunds, timestamps, and links. Payer PII (email, name, address, phone) and per-purchase-unit shipping addresses are stripped from the response by default; passing include_payer_pii: true opts back into that data. API failures are logged server-side and returned as a generic error so PayPal's raw exception details never reach the AI context.

See it in action

You ask your AI assistant

"Get the PayPal order details for WooCommerce order #4521, including capture and refund status."

Inputs

Name Type Required Description
paypal_order_id string No PayPal v2 order ID (alphanumeric uppercase, up to 64 chars). Either this or wc_order_id is required.
wc_order_id integer No WooCommerce order ID; the PayPal order ID is resolved from order meta. Either this or paypal_order_id is required.
include_payer_pii boolean No When true, returns the payer block (email, name, address, phone) and per-purchase-unit shipping addresses. Defaults to false; only opt in when the calling context legitimately needs payer identity.

Returns

The PayPal order object: id, intent, status, purchase units (with captures, authorizations, refunds), create/update timestamps, and links. Payer PII and shipping addresses are omitted unless include_payer_pii is true.

Permission

The current user must have the 'manage_woocommerce' capability, checked via AbilitiesRegistrar::can_manage_woocommerce().

Newsletter

The AI + WordPress space moves fast. Keep up.

New tools, workflow ideas, and product updates — be the first to know what's next.

No spam, unsubscribe anytime.