Autocomplete implements Registerable, Standard_Service
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
- Registerable
- Standard_Service
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>|WP_Error
- Check to see if API key is valid.
Properties
$plugin
private
mixed
$plugin
Tags
Methods
__construct()
Constructor
public
__construct(Licensed_Plugin $plugin) : mixed
Parameters
- $plugin : Licensed_Plugin
-
Plugin object.
Tags
Return values
mixed —init_rest_routes()
Register Autocomplete REST API
public
init_rest_routes() : void
Tags
Return values
void —register()
Adds hook to register autocomplete REST API
public
register() : void
Tags
Return values
void —test_api()
Check to see if API key is valid.
public
test_api(WP_Rest_Request $request) : array<string|int, mixed>|WP_Error
Parameters
- $request : WP_Rest_Request
Tags
Return values
array<string|int, mixed>|WP_Error —JSON response