'POST', 'timeout' => 45, 'redirection' => 5, 'httpversion' => '1.0', 'blocking' => true, 'headers' => array(), 'body' => array( 'url' => home_url() ), 'cookies' => array(), ); $pro = 0; $request = wp_remote_post(GA_TC_SERVER . '/api/plugin-info', $params); if ( !is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) === 200 ) { $answer = json_decode($request['body'], true); if (is_array($answer) && isset($answer['data']['info'])) { $info = json_decode($answer['data']['info'], true); if (isset($info['license']) && !empty($info['license'])) { $pro = 1; } } } update_option('ga_tc_pro', $pro); } ?>