WC_Helper_Subscriptions_API::refreshpublic staticWC 1.0

Refresh account and subscriptions from WooCommerce.com and serve subscriptions as JSON.

Method of the class: WC_Helper_Subscriptions_API{}

No Hooks.

Returns

null. Nothing (null).

Usage

$result = WC_Helper_Subscriptions_API::refresh();

WC_Helper_Subscriptions_API::refresh() code WC 10.3.3

public static function refresh() {
	try {
		WC_Helper::refresh_helper_subscriptions();
		WC_Helper::get_subscriptions();
		WC_Helper::get_product_usage_notice_rules();
		self::get_subscriptions();
	} catch ( Exception $e ) {
		wp_send_json_error(
			array(
				'message' => $e->getMessage(),
			),
			400
		);
	}

	WC_Helper::fetch_helper_connection_info();
}