>|null $request The REST request object. Ignored. * @return WP_Error Always an error, since the endpoint was removed. */ public function check_permission( $request = null ) { unset( $request ); // Kept for backward compatibility. McpEndpointRemoval::doing_it_wrong( __METHOD__ ); return self::get_removed_error(); } /** * Formerly validated a request to the WooCommerce MCP endpoint. * * @deprecated 11.3.0 * * @param \WP_REST_Request $request The REST request object. Ignored. * @phpstan-param \WP_REST_Request> $request * @return WP_Error Always an error, since the endpoint was removed. */ public function validate_request( \WP_REST_Request $request ) { unset( $request ); // Kept for backward compatibility. McpEndpointRemoval::doing_it_wrong( __METHOD__ ); return self::get_removed_error(); } /** * Formerly returned the API key permissions of the current WooCommerce MCP request. * * @deprecated 11.3.0 * * @return null Always null, since there is no WooCommerce MCP request. */ public static function get_current_user_permissions(): ?string { McpEndpointRemoval::doing_it_wrong( __METHOD__ ); return null; } /** * Formerly checked REST-derived ability permissions against the API key permissions. * * @deprecated 11.3.0 * * @param bool $allowed Whether the operation is allowed. * @param string $method HTTP method. Ignored. * @param object $controller REST controller instance. Ignored. * @return bool The unchanged $allowed value. */ public function check_ability_permission( $allowed, $method, $controller ) { unset( $method, $controller ); // Kept for backward compatibility. McpEndpointRemoval::doing_it_wrong( __METHOD__ ); return $allowed; } /** * Get the error returned in place of the removed authentication. * * @return WP_Error */ private static function get_removed_error(): WP_Error { return new WP_Error( 'woocommerce_mcp_removed', __( 'The WooCommerce MCP endpoint was removed.', 'woocommerce' ), array( 'status' => 410 ) ); } }