Autocomplete implements Service, Registerable
Provides functions for the plugin settings page in the WordPress admin.
Settings are registered under: WooCommerce -> Settings -> Products -> Fast Cart
Tags
Interfaces, Classes and Traits
- Service
- Marker interface to denote a service.
- Registerable
- An object that can be registered with WordPress via the Plugin API, i.e. add_action() and add_filter().
Table of Contents
- $plugin : mixed
- __construct() : mixed
- Constructor
- init_rest_routes() : void
- Register Autocomplete REST API
- register() : void
- Adds hook to register autocomplete REST API
- test_api() : array<string|int, mixed>
- Check to see if API key is valid.
Properties
$plugin
protected
mixed
$plugin
Methods
__construct()
Constructor
public
__construct(Licensed_Plugin $plugin) : mixed
Parameters
- $plugin : Licensed_Plugin
-
Plugin object.
Return values
mixed —init_rest_routes()
Register Autocomplete REST API
public
init_rest_routes() : void
Return values
void —register()
Adds hook to register autocomplete REST API
public
register() : void
Return values
void —test_api()
Check to see if API key is valid.
public
test_api(WP_Rest_Request $request) : array<string|int, mixed>
Parameters
- $request : WP_Rest_Request
Return values
array<string|int, mixed> —JSON response