You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 21, 2025. It is now read-only.
It's not possible to create a rest alias for routes that use DELETE/PUT/PATCH.
For example, this rest_alias: 'rest_alias' => '/wp/v2/posts/(?P<id>[\d]+)',
Will always get matched to the "update route".
But the delete route for a post uses the same route pattern. But with a different method.
I think a feature needs an optional method property, that's also exposed in the rest api under /features
Relevant code parts below:
/** * Gets the REST method for the feature based on the feature type. * * @since 0.1.0 * @return string The REST method. */publicfunctionget_rest_method() {
// This would be new.if(this->method !== null) {
return$this->method;
}
if ( self::TYPE_TOOL === $this->type ) {
return WP_REST_Server::CREATABLE;
}
return WP_REST_Server::READABLE;
}