From 46f6c757ef59182efd8ddc9e6e3e324169a3fd1f Mon Sep 17 00:00:00 2001 From: Tim Carr Date: Tue, 18 Aug 2026 10:48:13 +0800 Subject: [PATCH 1/2] Abilities API: Update WordPress MCP Adapter to `0.6.1` --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 319b18988..4c03599e4 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "license": "GPLv3", "require": { "convertkit/convertkit-wordpress-libraries": "2.1.7", - "wordpress/mcp-adapter": "^0.5.0" + "wordpress/mcp-adapter": "^0.6.1" }, "require-dev": { "php-webdriver/webdriver": "^1.0", From 124f4a6c7133015eec4bf5eba01fe044117066c6 Mon Sep 17 00:00:00 2001 From: Tim Carr Date: Tue, 18 Aug 2026 14:25:34 +0800 Subject: [PATCH 2/2] Abilities API: Update MCP Adapter to 0.6.1 --- composer.json | 3 ++- includes/class-wp-convertkit.php | 22 +++++++++++++++------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 4c03599e4..f60da586e 100644 --- a/composer.json +++ b/composer.json @@ -97,7 +97,8 @@ }, "config": { "allow-plugins": { - "dealerdirect/phpcodesniffer-composer-installer": true + "dealerdirect/phpcodesniffer-composer-installer": true, + "automattic/jetpack-autoloader": true } }, "repositories": [ diff --git a/includes/class-wp-convertkit.php b/includes/class-wp-convertkit.php index 39f8338ab..e0898a941 100644 --- a/includes/class-wp-convertkit.php +++ b/includes/class-wp-convertkit.php @@ -245,15 +245,23 @@ public function initialize_mcp() { return; } - // Bail if the WordPress MCP Adapter autoloader is missing. - if ( ! file_exists( CONVERTKIT_PLUGIN_PATH . '/vendor/autoload.php' ) ) { - return; - } + // Load MCP Adapter if another Plugin hasn't already loaded it. + if ( ! class_exists( 'WP\\MCP\\Core\\McpAdapter' ) ) { + // Bail if the WordPress MCP Adapter autoloader is missing. + if ( ! file_exists( CONVERTKIT_PLUGIN_PATH . '/vendor/autoload.php' ) ) { + return; + } - // Load MCP Adapter. - require_once CONVERTKIT_PLUGIN_PATH . '/vendor/autoload.php'; + // Load MCP Adapter. + require_once CONVERTKIT_PLUGIN_PATH . '/vendor/autoload.php'; + + // Bail if the MCP Adapter class doesn't exist - something went wrong with the autoloader. + if ( ! class_exists( 'WP\\MCP\\Core\\McpAdapter' ) ) { + return; + } + } - // Bail if the MCP Adapter class doesn't exist - something went wrong with the autoloader. + // Sanity check MCP Adapter is loaded. if ( ! class_exists( 'WP\\MCP\\Core\\McpAdapter' ) ) { return; }