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-onlyLook 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().
More WooCommerce PayPal Payments abilities
Get PayPal order tracking
Look up the shipment tracking entries PayPal has on file for a specific WooCommerce order.
Get PayPal Payments connection status
Check whether the store's PayPal merchant account is connected and see its sandbox/live mode, merchant ID, and email, without exposing API credentials.
Get PayPal Payments payment methods
List every PayPal payment gateway configured in the store along with its enabled state and any setup warnings.