YITH WooCommerce Subscription API

FREE Plugin

The plugin provides a REST API endpoint for the YITH WooCommerce Subscription plugin.

Description

This plugin provides a simple REST API for the popular WordPress plugin YITH WooCommerce Subscription. We have not tried to implement all plugin functionality in REST API, we just implemented endpoints required to check active user subscriptions.

As far as this plugin provides API for the YITH WooCommerce Subscription plugin, it should be installed.

NB: We do not develop or maintain the YITH WooCommerce Subscription plugin. So, please do not report bugs and do not ask questions regarding that plugin.
PS: We are sure this REST API is incomplete, so feel free to suggest missed features.

Key features:

  • Check whether the user has an active subscription for the product or not.
  • List all user active subscriptions.
YITH WooCommerce Subscription API

Installation

  1. First of all install YITH WooCommerce Subscription.
  2. Download the YITH WooCommerce Subscription API plugin from the WordPress plugin directory.
  3. Upload the plugin ZIP file via the “Add Plugins” page of your WooCommerce admin panel. Or upload the plugin files directly to the `/wp-content/plugins/yith-woocommerce-subscription-api` folder.
  4. Activate the plugin through the ‘Plugins’ screen in WordPress.
  5. The plugin does not require any further configuration.
  6. If you need to restrict access to API, you should use one of the authentication plugins – https://developer.wordpress.org/rest-api/using-the-rest-api/authentication/

You can find more information about the installation and configuration of the YITH WooCommerce Subscription API extension in our knowledge base.

YITH WooCommerce Subscription API

API Usage Examples

Check user for product subscription:
https://[your domain]/wp-json/yith-subscription/v1/status/[ user ID ]/[ product ID ]

List user active subscriptions:
https://[your domain]/wp-json/yith-subscription/v1/list/[ user ID ]

NB: This plugin does not provide any authentication, so one should take care of this using third-party plugins if required. Some example plugins are OAuth 1.0a Server, Application Passwords, and JSON Web Tokens.

YITH WooCommerce Subscription API