Access WP_REST_Server from within plugin namespace
WordPress (version 5.0) doesn’t use namespaces for it’s classes, so try to use the global one: \WP_REST_Server to avoid assuming it’s in your custom namespace. One of the reason for this is that WordPress supports PHP 5.2.4+ that doesn’t support namespaces. The minimum is PHP 5.3.3+, if I remember correctly, to support it. Later this … Read more