WC_Helper_Admin
in package
WC_Helper Class
The main entry-point for all things related to the Helper. The Helper manages the connection between the store and an account on WooCommerce.com.
Table of Contents
- add_marketplace_settings() : mixed
- Pushes settings onto the WooCommerce Admin global settings object (wcSettings).
- get_connection_url() : string
- Generates the URL for connecting or disconnecting the store to/from WooCommerce.com.
- get_featured() : mixed
- Fetch featured products from WooCommerce.com and serve them as JSON.
- get_permission() : mixed
- The Extensions page can only be accessed by users with the manage_woocommerce capability. So the API mimics that behavior.
- load() : void
- Loads the class, runs on init
- register_rest_routes() : mixed
- Registers the REST routes for the featured products endpoint.
Methods
add_marketplace_settings()
Pushes settings onto the WooCommerce Admin global settings object (wcSettings).
public
static add_marketplace_settings(mixed $settings) : mixed
Parameters
- $settings : mixed
-
The settings object we're amending.
Return values
mixed — $settingsget_connection_url()
Generates the URL for connecting or disconnecting the store to/from WooCommerce.com.
public
static get_connection_url() : string
Approach taken from existing helper code that isn't exposed.
Return values
string —get_featured()
Fetch featured products from WooCommerce.com and serve them as JSON.
public
static get_featured() : mixed
Return values
mixed —get_permission()
The Extensions page can only be accessed by users with the manage_woocommerce capability. So the API mimics that behavior.
public
static get_permission() : mixed
Return values
mixed —load()
Loads the class, runs on init
public
static load() : void
Return values
void —register_rest_routes()
Registers the REST routes for the featured products endpoint.
public
static register_rest_routes() : mixed
This endpoint is used by the WooCommerce > Extensions > Discover page.