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

Jetpack_Stats   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 18
rs 10
c 0
b 0
f 0
wmc 4
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A init() 0 16 4
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