1. Home
  2. Knowledge Base
  3. Advanced Coupons
  4. Integrations
  5. How to use the WordPress Abilities API with Advanced Coupons

How to use the WordPress Abilities API with Advanced Coupons

Managing coupons usually means clicking through the WooCommerce admin one screen at a time. If you work with an AI assistant like Claude or ChatGPT, Advanced Coupons can take those instructions directly through the WordPress Abilities API, added in version 4.7.4, so you can ask your assistant to list, create, update, schedule, or remove coupons.

What is the WordPress Abilities API?

The WordPress Abilities API is a standard, available in current versions of WordPress, that lets plugins describe what they can do in a format software can read. Instead of every AI tool needing a custom integration for your store, a plugin registers its abilities once, and any compatible tool can use them.

Those abilities reach an AI assistant through a connector called an MCP adapter. MCP (Model Context Protocol) is the common language AI assistants use to talk to outside tools. Advanced Coupons registers a set of coupon abilities on this standard, all grouped under a single Advanced Coupons category so a connected assistant can find them together. Depending on the adapter you use, your assistant may list each ability directly or discover them on request.

The abilities register automatically once the Abilities API is present, which is the case on WordPress 7.0 and later. On earlier WordPress versions, they register only if the separate Abilities API feature plugin is active.

What you can do with it

Advanced Coupons registers eight abilities. Three are read-only, and five make changes to your coupons. The ones that change data are marked so your AI assistant asks you to confirm before it runs them.

AbilityWhat it doesChanges data?
List couponsReturns a filtered list of coupons (by type, status, usage count, or expiry).No
Get couponReturns the full configuration of a single coupon, including cart conditions, BOGO setup, role restrictions, URL trigger, and schedule.No
Get coupons summaryReturns coupon usage and discount totals for a date range, plus your top-performing codes.No
Create couponCreates a new coupon with optional Advanced Coupons settings.Yes
Update couponUpdates an existing coupon. Only the fields you provide are changed.Yes
Delete couponMoves a coupon to the trash.Yes
Set coupon URL triggerTurns the URL coupon trigger on or off and sets its related options.Yes
Set coupon scheduleTurns a coupon’s date range schedule on or off and sets its start and end dates.Yes

In practice this means you can ask your assistant things like “show me every coupon expiring this month”, “create a 15% off coupon called SPRING15 that expires in 30 days”, or “which five coupons drove the most discount last quarter?” and it will use the matching ability to answer or act.

What you’ll need

  • WordPress 7.0 or newer (the Abilities API is built in), or an earlier version with the Abilities API feature plugin active.
  • WooCommerce active, with Advanced Coupons 4.7.4 or newer installed and running (the Abilities API integration was added in 4.7.4).
  • An MCP adapter plugin that bridges WordPress to your AI assistant (see the WordPress MCP adapter guide). Advanced Coupons registers the abilities; it does not include the adapter itself.
  • A user account that can manage WooCommerce (a Shop Manager or Administrator). Your assistant acts as that signed-in user.

Connect your AI assistant

The exact steps depend on which MCP adapter you use, but the flow is the same:

  1. Confirm you’re on WordPress 7.0 or newer, with WooCommerce and Advanced Coupons active.
  2. Install and configure an MCP adapter plugin, and connect it to your AI assistant following that adapter’s instructions.
  3. Authenticate as a user who can manage WooCommerce, so the coupon abilities are available.
  4. In your AI assistant, ask what it can do with your coupons, so it discovers the available Advanced Coupons abilities.
  5. Start with a read-only request such as “list my active coupons” to confirm the connection works before making any changes.

Permissions and safety

Every one of the eight abilities, including the read-only ones, requires a user who can manage WooCommerce. Coupon data such as codes, discount amounts, usage limits, and revenue summaries is store-owner information, so a customer or subscriber account cannot run any of these abilities.

The five abilities that change data are marked as destructive. A well-behaved AI assistant shows you a confirmation prompt before running them, so nothing is created, changed, or trashed without your say-so.

When your assistant creates or updates a coupon, it goes through the exact same save process as the Advanced Coupons edit screen. There is no separate “AI” path, so coupons made this way behave identically to ones you create by hand, and any connected integrations keep working as normal.

Two abilities depend on their feature being switched on. Set coupon URL trigger works only when the URL Coupons feature (How to apply a coupon with a URL) is enabled, and Set coupon schedule works only when the Scheduler feature (How to schedule coupons) is enabled. If the feature is off, the ability returns a clear message instead of making a change.

Turn abilities off (for developers)

If you’d rather Advanced Coupons not register any abilities, you can switch them off in code. Define this constant (for example in wp-config.php):

define( 'ACFWF_DISABLE_ABILITIES', true );

Or use the filter:

add_filter( 'acfwf_disable_abilities', '__return_true' );

Frequently asked questions

Which AI assistants does this work with?
Any assistant that supports MCP, such as Claude Desktop or the ChatGPT desktop app, once you’ve connected it to your site through an MCP adapter. Advanced Coupons doesn’t favour any particular assistant.

Can my AI assistant see customer or order data through this?
No. These abilities cover coupons and coupon-usage summaries only. They also require a user who can manage WooCommerce, so they can’t be run by customer accounts.

Will coupons my assistant creates behave differently from ones I make manually?
No. They’re saved through the same process as the coupon edit screen, so they behave exactly the same.

Do I need to write any code to use this?
No. Using the abilities only needs WordPress 7.0, WooCommerce, and an MCP adapter. Code is involved only if you want to turn the abilities off.

Need help?

If you have a question or run into any issues, we’re here to help.

Was this article helpful?

Related Articles

Complete Your Purchase