PluginProbe
StoreEngine — Complete eCommerce Solution with Memberships, Licensing, Affiliates & More / 1.9.1
StoreEngine — Complete eCommerce Solution with Memberships, Licensing, Affiliates & More v1.9.1
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 1.9.1, at includes/cli.php

37 lines 705 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\License;
11 use StoreEngine\Cli\Order;
12 use StoreEngine\Traits\Singleton;
13 use StoreEngine\Utils\Helper;
14 use WP_CLI;
15
16 if ( ! defined( 'ABSPATH' ) ) {
17 exit;
18 }
19
20 class Cli {
21 use Singleton;
22
23 protected function __construct() {
24 add_action( 'cli_init', [ __CLASS__, 'register_cli_commands' ] );
25 }
26
27 public static function register_cli_commands() {
28 WP_CLI::add_command( 'storeengine order', Order::class );
29
30 if ( Helper::get_addon_active_status( 'license-management', true ) ) {
31 WP_CLI::add_command( 'storeengine license', License::class );
32 }
33 }
34 }
35
36 // End of the file cli.php
37