includes/tracks/class-wc-site-tracking.php
Method init
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function init() {
// Define window.wcTracks.recordEvent in case it is enabled client-side.
self::register_scripts();
add_filter( 'admin_footer', array( __CLASS__, 'add_tracking_function' ), 24 );
Method add_enable_tracking_function
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function add_enable_tracking_function() {
global $wp_scripts;
if ( ! isset( $wp_scripts->registered['woo-tracks'] ) ) {
return;