WordPress 7.0 AI Infrastructure: Killing Custom Glue Code

We need to talk about how we’ve been building AI features. For the last couple of years, integrating an LLM into a site felt like the Wild West. You’d hardcode an OpenAI key into a custom options page, write a bespoke wrapper for their specific API, and hope they didn’t deprecate an endpoint overnight. If you wanted to switch to Anthropic? You’d start over. The upcoming WordPress 7.0 AI infrastructure is finally putting an end to that fragmented mess by introducing a standardized foundation.

Instead of every plugin author reinventing the wheel, WordPress is moving toward a provider-agnostic architecture. This isn’t just a “nice to have” update; it’s a fundamental shift in how the core handles external intelligence. Specifically, it introduces a shared layer where AI services and site capabilities can actually talk to each other without dozens of brittle, custom-coded bridges.

The Abilities API: Teaching WordPress to Speak “Agent”

The first major pillar of the WordPress 7.0 AI infrastructure is the Abilities API. Think of this as a registry for what your site can actually do. In the past, if you wanted an AI to update a WooCommerce stock level, you had to write the specific logic to handle that request. Now, plugins can register “Abilities” that external tools can discover automatically.

Furthermore, these abilities aren’t just simple functions. They define their own inputs, return types, and—most importantly—the required permissions. This makes your site “agent-ready.” Whether it’s serious AI integration or a simple automation, the system now has a standard way to query what’s available via REST endpoints or the Model Context Protocol (MCP).

<?php
/**
 * Example: Registering a custom ability to optimize product descriptions.
 */
function bbioon_register_product_optimizer_ability() {
    if ( ! function_exists( 'wp_register_ability' ) ) {
        return;
    }

    wp_register_ability( 'bbioon/optimize-product', [
        'description' => __( 'Optimizes WooCommerce product descriptions for SEO.', 'bbioon' ),
        'parameters'  => [
            'product_id' => [
                'type'     => 'integer',
                'required' => true,
            ],
        ],
        'callback'    => 'bbioon_handle_product_optimization',
        'capabilities' => 'edit_products',
    ] );
}
add_action( 'init', 'bbioon_register_product_optimizer_ability' );

The WordPress AI Client: Decoupling the Provider

The second pillar is the AI Client. I’ve seen sites with four different plugins, each requiring its own OpenAI API key. It’s a performance bottleneck and a management nightmare. Consequently, the AI Client introduces a consistent PHP interface for interacting with any model. Whether you’re using Claude, GPT-4, or Gemini, the code you write remains the same.

Therefore, the Connectors API works alongside the client to manage these external service credentials in one central “Connectors” screen. This is a massive win for stability. If a client decides to move from OpenAI to a self-hosted Llama instance, you just update the connector settings. You don’t have to refactor a single line of plugin logic. For a deep dive into how this fits into the broader core roadmap, check out my thoughts on the WordPress 7.0 AI Roadmap.

Why the MCP Adapter Changes the Game

If the Abilities API is the “what” and the AI Client is the “how,” then the MCP Adapter is the “bridge.” The Model Context Protocol (MCP) is an open standard that allows AI assistants (like Claude or ChatGPT) to see and use your site’s tools directly. By implementing this, WordPress 7.0 allows an AI to act as a true site administrator under your supervision.

Imagine telling an AI, “Find all products with low stock and draft a restock report.” In the old days, that was a complex sequence of API calls. Now, the AI simply “sees” the abilities registered by WooCommerce and executes them. It’s a level of interoperability we’ve never had in the ecosystem before. You can read more about the technical specifics of this client on Rich Tabor’s blog.

Look, if this WordPress 7.0 AI infrastructure stuff is eating up your dev hours, let me handle it. I’ve been wrestling with WordPress since the 4.x days.

Stop Building Silos

The bottom line is that we need to stop building AI features in silos. The WordPress 7.0 AI infrastructure is a call to action for developers to start using shared standards. By adopting the Abilities API and the centralized AI Client, we’re not just making our lives easier; we’re building a more resilient, performant web. Stop writing custom glue code and start building on top of the foundation that’s finally here.

For the official announcement and more examples, I highly recommend checking out the original post on the WordPress.com blog.

author avatar
Ahmad Wael
I'm a WordPress and WooCommerce developer with 15+ years of experience building custom e-commerce solutions and plugins. I specialize in PHP development, following WordPress coding standards to deliver clean, maintainable code. Currently, I'm exploring AI and e-commerce by building multi-agent systems and SaaS products that integrate technologies like Google Gemini API with WordPress platforms, approaching every project with a commitment to performance, security, and exceptional user experience.

Leave a Comment