1 | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName |
||
10 | class WC_Services_Installer { |
||
11 | |||
12 | /** |
||
13 | * The instance of the Jetpack class. |
||
14 | * |
||
15 | * @var Jetpack |
||
16 | */ |
||
17 | private $jetpack; |
||
18 | |||
19 | /** |
||
20 | * The singleton instance of this class. |
||
21 | * |
||
22 | * @var WC_Services_Installer |
||
23 | */ |
||
24 | private static $instance = null; |
||
25 | |||
26 | /** |
||
27 | * Returns the singleton instance of this class. |
||
28 | * |
||
29 | * @return object The WC_Services_Installer object. |
||
30 | */ |
||
31 | public static function init() { |
||
37 | |||
38 | /** |
||
39 | * Constructor |
||
40 | */ |
||
41 | public function __construct() { |
||
47 | |||
48 | /** |
||
49 | * Verify the intent to install WooCommerce Services, and kick off installation. |
||
50 | */ |
||
51 | public function try_install() { |
||
94 | |||
95 | /** |
||
96 | * Set up installation error admin notice. |
||
97 | */ |
||
98 | public function add_error_notice() { |
||
103 | |||
104 | /** |
||
105 | * Notify the user that the installation of WooCommerce Services failed. |
||
106 | */ |
||
107 | public function error_notice() { |
||
114 | |||
115 | /** |
||
116 | * Download and install the WooCommerce Services plugin. |
||
117 | * |
||
118 | * @return bool result of installation |
||
119 | */ |
||
120 | private function install() { |
||
138 | |||
139 | /** |
||
140 | * Activate the WooCommerce Services plugin. |
||
141 | * |
||
142 | * @return bool result of activation |
||
143 | */ |
||
144 | private function activate() { |
||
150 | } |
||
151 | |||
153 |