# Stop checking for updates from Osclass.

Updated 16/09/2019 to fix auto update for older plugins (Google Maps and Google Analytics).

Scroll down to see updated part (between warning messages).

Open the following file:

```
oc-includes/osclass/utils.php
```

Locate this code:

```
$uri = osc_market_url($type, $update_uri);
```

Replace it with this code:

Locate this code:

```
$url = osc_market_url($section, $element);$data = json_decode(osc_file_get_contents($url, array('api_key' => osc_market_api_connect())), true);
```

Replace it with this code:

Locate this code:

```
$download_post_data = array('api_key' => osc_market_api_connect());
```

Replace it with this code:

```
$download_post_data = array();
```

Locate this code:

```
$url = osc_market_url($section, $code);$data = osc_file_get_contents($url, array('api_key' => osc_market_api_connect()));$data = json_decode(osc_file_get_contents($url, array('api_key' => osc_market_api_connect())), true);
```

Replace it with this code:

```
return array('error' => 2, 'message' => __('Market updating not available.'), 'data' => $data);
```

Locate this code:

```
if(osc_market_external_sources())
```

Replace it with this code:

```
if(osc_market_external_sources() && strpos($update_uri, 'osclass.org') === false)
```

**Note**! The upper replacement must be done on all occurrences of the code (it appears 2 times).

Locate this code:

```
if(!osc_market_external_sources()
```

Replace it with this code:

```
if(!osc_market_external_sources() || strpos($update_uri, 'osclass.org') !== false)
```

​

Open the following file:

Locate this code:

```
$data = json_decode(osc_file_get_contents(osc_market_url($section, $code), array('api_key' => osc_market_api_connect())), true);
```

Replace it with this code:

```
echo json_encode(array('error' => 3, 'error_msg' => __('Market updating not available.')));
```

Locate this code:

```
$data = osc_file_get_contents('https://osclass.org/latest_version_v1.php?callback=?');
```

Replace it with this code:

```
echo json_encode(array('error' => 1, 'msg' => __('Version could not be checked')));
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mindstellar.com/osclass-docs/v3.9.0/legacy-installations-pre-3.8.0/remove-calls-to-osclass/stop-checking-for-updates-from-osclass..md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
