get_api_url(), 'octolize-sender', \FSVendor\WPDesk_Logger::DEBUG); $response = \wp_remote_post($this->get_api_url(), array('method' => 'POST', 'timeout' => 5, 'redirection' => 5, 'httpversion' => '1.0', 'blocking' => \false, 'headers' => array('user-agent' => 'OctolizeSender'), 'body' => json_encode($payload), 'cookies' => array())); if ($response instanceof \WP_Error) { throw new \FSVendor\WPDesk_Tracker_Sender_Exception_WpError('Payload send error', $response); } else { return $response; } } /** * @return string */ private function get_api_url() { $api_url = $this->api_url; if (apply_filters('wpdesk_tracker_use_testdata', \false)) { $api_url = $this->test_api_url; } return $api_url; } }