# subscription/2.0.0/includes/API.php

Subscriptions for WooCommerce with Stripe Recurring Payments, version 2.0.0. 34 lines.

- Page: https://pluginprobe.com/plugins/subscription/2.0.0/code/includes/API.php
- Raw: https://pluginprobe.com/plugins/subscription/2.0.0/raw/includes/API.php
- Modified: 2026-09-14T12:17:12+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/subscription/2.0.0/code/includes/API.php#L10-L20`.

```php
<?php
/**
 * REST API bootstrap.
 *
 * @package SpringDevs\Subscription
 */

namespace SpringDevs\Subscription;

use SpringDevs\Subscription\Api\PlanController;

/**
 * API Class
 */
class API {


	/**
	 * Initialize the class
	 */
	public function __construct() {
		add_action( 'rest_api_init', array( $this, 'register_api' ) );
	}

	/**
	 * Register the API
	 *
	 * @return void
	 */
	public function register_api() {
		( new PlanController() )->register_routes();
	}
}

```
