Automattic\WooCommerce\Internal\MCP

McpEndpointRemoval::doing_it_wrong │ public static │ WC 1.0

Report a call to code that was removed along with the WooCommerce MCP endpoint.

Method of the class: McpEndpointRemoval{}

No Hooks.

Returns

null. Nothing (null).

Usage

$result = McpEndpointRemoval::doing_it_wrong( $function_name ): void;
$function_name(string) (required)
The removed function or method that was called.

McpEndpointRemoval::doing_it_wrong() code WC 11.3.0

public static function doing_it_wrong( string $function_name ): void {
	wc_doing_it_wrong(
		$function_name,
		sprintf(
			/* translators: 1: Function or method name, 2: WooCommerce version, 3: Documentation URL. */
			__( '%1$s was removed in WooCommerce %2$s along with the WooCommerce MCP endpoint and its REST-based abilities. WooCommerce abilities remain available through the WordPress Abilities API, and the MCP Adapter plugin exposes them to MCP clients. See %3$s.', 'woocommerce' ),
			$function_name,
			self::REMOVED_IN,
			self::DOCS_URL
		),
		self::REMOVED_IN
	);
}