public function setUp()
 {
     parent::setUp();
     if (!is_a($this->loader, 'WC_Connect_Loader')) {
         $this->loader = new WC_Connect_Loader();
         $this->loader->load_dependencies();
     }
     if (!is_a($this->validator, 'WC_Connect_Service_Schemas_Validator')) {
         $this->validator = new WC_Connect_Service_Schemas_Validator();
     }
 }
 /**
  * Adds useful WP/WC/WCC information to request bodies
  *
  * @param array $initial_body
  * @return array
  */
 protected function request_body($initial_body = array())
 {
     $default_body = array('settings' => array());
     $body = array_merge($default_body, $initial_body);
     // Add interesting fields to the body of each request
     $body['settings'] = wp_parse_args($body['settings'], array('store_guid' => $this->get_guid(), 'base_city' => WC()->countries->get_base_city(), 'base_country' => WC()->countries->get_base_country(), 'base_state' => WC()->countries->get_base_state(), 'currency' => get_woocommerce_currency(), 'dimension_unit' => strtolower(get_option('woocommerce_dimension_unit')), 'jetpack_version' => JETPACK__VERSION, 'wc_version' => WC()->version, 'weight_unit' => strtolower(get_option('woocommerce_weight_unit')), 'wp_version' => get_bloginfo('version'), 'last_services_update' => get_option('wc_connect_services_last_update', 0), 'last_heartbeat' => get_option('wc_connect_last_heartbeat', 0), 'last_rate_request' => get_option('wc_connect_last_rate_request', 0), 'active_services' => $this->wc_connect_loader->get_active_services(), 'disable_stats' => Jetpack::is_staging_site()));
     return $body;
 }