diff --git a/src/Client.php b/src/Client.php index 0dc3a1e..1a7e48d 100644 --- a/src/Client.php +++ b/src/Client.php @@ -127,6 +127,26 @@ public function insights() { return $this->insights; } + /** + * Initialize plugin/theme updater + * + * @return void + */ + public function updater() { + // do not show update notice on ajax request and rest api request + if ( wp_doing_ajax() || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) ) { + return; + } + + // show deprecated notice + _deprecated_function( __CLASS__ . '::updater', '2.0', '\Appsero\Updater::init, for more details please visit: https://app.getwemail.io/campaigns/94eef570-bc95-448f-9178-1386f009b2d9' ); + + // initialize the new updater + if ( method_exists( '\Appsero\Updater', 'init' ) ) { + \Appsero\Updater::init( $this ); + } + } + /** * Initialize license checker *