Automattic\WooCommerce\Internal\Abilities

AbilitiesTracking::get_external_client │ private │ WC 1.0

Get the MCP client, as one of the known clients, other or none.

The client supplies its own name, so only known clients are recorded by name.

Method of the class: AbilitiesTracking{}

No Hooks.

Returns

string.

Usage

// private - for code of main (parent) class only
$result = $this->get_external_client(): string;

AbilitiesTracking::get_external_client() code WC 11.3.0

private function get_external_client(): string {
	try {
		return $this->resolve_external_client();
	} catch ( \Throwable $e ) {
		// The session lookup is MCP Adapter code; a failure there must not break the ability call.
		return self::NONE;
	}
}