summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/jetpack_vendor/automattic/jetpack-licensing/src/class-licensing.php')
-rw-r--r--plugins/jetpack/jetpack_vendor/automattic/jetpack-licensing/src/class-licensing.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-licensing/src/class-licensing.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-licensing/src/class-licensing.php
index 056004f5..e333bc76 100644
--- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-licensing/src/class-licensing.php
+++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-licensing/src/class-licensing.php
@@ -8,6 +8,7 @@
namespace Automattic\Jetpack;
use Automattic\Jetpack\Connection\Manager as Connection_Manager;
+use Automattic\Jetpack\Licensing\Endpoints;
use Jetpack_IXR_ClientMulticall;
use Jetpack_Options;
use WP_Error;
@@ -62,6 +63,19 @@ class Licensing {
add_action( 'add_option_' . self::LICENSES_OPTION_NAME, array( $this, 'attach_stored_licenses' ) );
add_action( 'update_option_' . self::LICENSES_OPTION_NAME, array( $this, 'attach_stored_licenses' ) );
add_action( 'jetpack_authorize_ending_authorized', array( $this, 'attach_stored_licenses_on_connection' ) );
+ add_action( 'rest_api_init', array( $this, 'initialize_endpoints' ) );
+ }
+
+ /**
+ * Initialize endpoints required for Licensing package.
+ *
+ * @since 1.7.0
+ *
+ * @return void
+ */
+ public function initialize_endpoints() {
+ $endpoints = new Endpoints();
+ $endpoints->register_endpoints();
}
/**