Completed
Push — try/tracks-store-stats ( dfee34 )
by
unknown
07:57
created

Jetpack_Stats::init()   A

Complexity

Conditions 4
Paths 4

Size

Total Lines 16
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 4
eloc 10
nc 4
nop 0
dl 0
loc 16
rs 9.2
c 0
b 0
f 0
1
<?php
2
3
class Jetpack_Stats {
4
	static function init() {
5
		if ( is_admin() ) {
6
			return;
7
		}
8
		if ( ! Jetpack::is_active() ) {
9
			return;
10
		}
11
		$plugins = get_plugins();
12
		$is_store = isset( $plugins[ 'woocommerce/woocommerce.php' ] );
13
		if ( ! $is_store ) {
14
			return;
15
		}
16
//		print_r( WC_Data::get_data_store() );
17
//		print_r( WC_Cart::get_cart_from_session() );
18
		print_r( WC() );
19
	}
20
}
21
22
add_action( 'init', array( 'Jetpack_Stats', 'init' ) );
23