Skip to content
This repository was archived by the owner on Feb 5, 2026. It is now read-only.
This repository was archived by the owner on Feb 5, 2026. It is now read-only.

Using several plugins with Abilities API leads to a Warning #154

@timur987

Description

@timur987

Summary

I noticed that a couple of plugins with composer dependencies to Abilities API start competing who will require the code.

Due to lack of rights to create a PR, here's a suggestion for a change.

Probably you guys know how to address that in a better way. If so, please let me know.

How to reproduce

I used CIAB setup with CIAB Admin and Big Sky where both of them had their own vendor/wordpress/abilities-api folders.

Image

Suggested change (git diff)

diff --git a/abilities-api.php b/abilities-api.php
index ea087ab..5c65b61 100644
--- a/abilities-api.php
+++ b/abilities-api.php
@@ -12,7 +12,7 @@
  * Plugin URI:        https://github.com/WordPress/abilities-api
  * Description:       Provides a framework for registering and executing AI abilities in WordPress.
  * Requires at least: 6.8
- * Version:           0.5.0
+ * Version:           0.5.1
  * Requires PHP:      7.2
  * Author:            WordPress.org Contributors
  * Author URI:        https://github.com/WordPress/abilities-api/graphs/contributors
@@ -24,7 +24,8 @@
 /**
  * Shortcut constant to the path of this file.
  */
-define( 'WP_ABILITIES_API_DIR', plugin_dir_path( __FILE__ ) );
+if ( ! defined( 'WP_ABILITIES_API_DIR' ) ) {
+	define( 'WP_ABILITIES_API_DIR', plugin_dir_path( __FILE__ ) );
 
-
-require_once WP_ABILITIES_API_DIR . 'includes/bootstrap.php';
+	require_once WP_ABILITIES_API_DIR . 'includes/bootstrap.php';
+}

cc @gziolo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions