PluginProbe
StoreEngine — Complete eCommerce Solution with Memberships, Licensing, Affiliates & More / 2.1.0
StoreEngine — Complete eCommerce Solution with Memberships, Licensing, Affiliates & More v2.1.0
2.3.0 2.2.0 2.1.1 2.1.0 2.0.0 1.10.0 1.9.1 1.9.0 1.2.1 1.2.2 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.6.0 All 59 releases
storeengine / includes / cli.php

cli.php in StoreEngine — Complete eCommerce Solution with Memberships, Licensing, Affiliates & More 2.1.0, at includes/cli.php

40 lines 875 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * CLI commands for StoreEngine
4 * @version 1.0.0
5 * @since 1.8.2
6 */
7
8 namespace StoreEngine;
9
10 use StoreEngine\Cli\Account;
11 use StoreEngine\Cli\License;
12 use StoreEngine\Cli\Order;
13 use StoreEngine\Traits\Singleton;
14 use StoreEngine\Utils\Helper;
15 use WP_CLI;
16
17 if ( ! defined( 'ABSPATH' ) ) {
18 exit;
19 }
20
21 class Cli {
22 use Singleton;
23
24 protected function __construct() {
25 add_action( 'cli_init', [ __CLASS__, 'register_cli_commands' ] );
26 }
27
28 public static function register_cli_commands() {
29 WP_CLI::add_command( 'storeengine order', Order::class );
30 WP_CLI::add_command( 'storeengine account', Account::class );
31 WP_CLI::add_command( 'storeengine backup', \StoreEngine\Backup\Cli::class );
32
33 if ( Helper::get_addon_active_status( 'license-management', true ) ) {
34 WP_CLI::add_command( 'storeengine license', License::class );
35 }
36 }
37 }
38
39 // End of the file cli.php
40