Rest_Api implements Registerable
Handles restrictions through the rest API.
Tags
Interfaces, Classes and Traits
- Registerable
Table of Contents
- register() : void
- Hook into WP.
- restrict_access_to_products() : WP_HTTP_Response
- Restrict access to the single product route provided by WC.
Methods
register()
Hook into WP.
public
register() : void
Return values
void —restrict_access_to_products()
Restrict access to the single product route provided by WC.
public
restrict_access_to_products(WP_HTTP_Response $result, WP_REST_Server $instance, WP_REST_Request $request) : WP_HTTP_Response
Parameters
- $result : WP_HTTP_Response
- $instance : WP_REST_Server
- $request : WP_REST_Request