1 | <?php |
||
18 | class Jetpack_WooCommerce_Analytics { |
||
19 | |||
20 | /** |
||
21 | * Instance of this class |
||
22 | * |
||
23 | * @var Jetpack_WooCommerce_Analytics - Static property to hold our singleton instance |
||
24 | */ |
||
25 | private static $instance = false; |
||
26 | |||
27 | /** |
||
28 | * Instance of the Universal functions |
||
29 | * |
||
30 | * @var Static property to hold concrete analytics impl that does the work (universal or legacy) |
||
31 | */ |
||
32 | private static $analytics = false; |
||
33 | |||
34 | /** |
||
35 | * WooCommerce Analytics is only available to Jetpack connected WooCommerce stores with both plugins set to active |
||
36 | * and WooCommerce version 3.0 or higher |
||
37 | * |
||
38 | * @return bool |
||
39 | */ |
||
40 | public static function should_track_store() { |
||
68 | |||
69 | /** |
||
70 | * This is our constructor, which is private to force the use of get_instance() |
||
71 | * |
||
72 | * @return void |
||
|
|||
73 | */ |
||
74 | private function __construct() { |
||
77 | |||
78 | /** |
||
79 | * Function to instantiate our class and make it a singleton |
||
80 | */ |
||
81 | public static function get_instance() { |
||
91 | } |
||
92 | |||
95 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.