PluginProbe
WooCommerce / 11.1.0
WooCommerce v11.1.0
11.1.0 11.1.0-rc.2 11.1.0-rc.1 11.1.0-beta.2 11.1.0-beta.1 11.0.1 11.0.0 11.0.0-rc.3 11.0.0-rc.2 11.0.0-rc.1 11.0.0-beta.2 11.0.0-beta.1 10.9.4 10.9.3 10.9.2 10.9.1 10.9.0 10.9.0-rc.1 10.9.0-beta.2 10.9.0-beta.1 10.8.1 10.8.0 10.8.0-rc.1 10.8.0-beta.2 10.8.0-beta.1 All 648 releases
woocommerce / src / Admin / Features / OnboardingTasks / Init.php
Init.php
57 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * WooCommerce Onboarding Tasks
4 */
5
6 namespace Automattic\WooCommerce\Admin\Features\OnboardingTasks;
7
8 use Automattic\WooCommerce\Admin\Features\OnboardingTasks\DeprecatedOptions;
9
10 /**
11 * Contains the logic for completing onboarding tasks.
12 */
13 class Init {
14 /**
15 * Class instance.
16 *
17 * @var OnboardingTasks instance
18 */
19 protected static $instance = null;
20
21 /**
22 * Get class instance.
23 */
24 public static function get_instance() {
25 if ( ! self::$instance ) {
26 self::$instance = new self();
27 }
28 return self::$instance;
29 }
30
31 /**
32 * Constructor
33 */
34 public function __construct() {
35 DeprecatedOptions::init();
36 TaskLists::init();
37 }
38
39 /**
40 * Get task item data for settings filter.
41 *
42 * @return array
43 */
44 public static function get_settings() {
45 $settings = array();
46 $wc_pay_is_connected = false;
47 if ( class_exists( '\WC_Payments' ) ) {
48 $wc_payments_gateway = \WC_Payments::get_gateway();
49 $wc_pay_is_connected = method_exists( $wc_payments_gateway, 'is_connected' )
50 ? $wc_payments_gateway->is_connected()
51 : false;
52 }
53
54 return $settings;
55 }
56 }
57