WooCommerce Code Reference

WC_Helper_Subscriptions_API
in package

WC_Helper_Subscriptions_API

The main entry-point for all things related to the Marketplace Subscriptions API. The Subscriptions API manages WooCommerce.com Subscriptions.

Table of Contents

activate()  : mixed
Activate a WooCommerce.com product.
connect()  : mixed
Connect a WooCommerce.com subscription.
disconnect()  : mixed
Disconnect a WooCommerce.com subscription.
get_permission()  : mixed
The Extensions page can only be accessed by users with the manage_woocommerce capability. So the API mimics that behavior.
get_subscriptions()  : mixed
Fetch subscriptions from WooCommerce.com and serve them as JSON.
install_url()  : mixed
Get the install URL for a WooCommerce.com product.
load()  : void
Loads the class, runs on init
refresh()  : mixed
Refresh account and subscriptions from WooCommerce.com and serve subscriptions as JSON.
register_rest_routes()  : mixed
Registers the REST routes for the Marketplace Subscriptions API.

Methods

activate()

Activate a WooCommerce.com product.

public static activate(WP_REST_Request $request) : mixed

This activates the plugin/theme on the site.

Parameters
$request : WP_REST_Request

Request object.

Return values
mixed