# Customization always loads PluginAPI version 0.1

**URL:** https://meta.discourse.org/t/customization-always-loads-pluginapi-version-0-1/54712
**Category:** Bug
**Created:** [December 23, 2016, 3:55pm UTC](https://meta.discourse.org/t/customization-always-loads-pluginapi-version-0-1/54712 "2016-12-23T15:55:32Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![LeoMcA](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/leomca/32/87233_2.png) [@LeoMcA](https://meta.discourse.org/u/LeoMcA)
#### Post date: [December 23, 2016, 3:55pm UTC](https://meta.discourse.org/t/customization-always-loads-pluginapi-version-0-1/54712/1 "2016-12-23T15:55:32Z")

</div>

Previously, when [adding a site customization making use of the PluginAPI](https://meta.discourse.org/t/using-the-pluginapi-in-site-customizations/41281) you could specify a version of the API to use in the `<script>` tag. Now that doesn’t work.

```plaintext
<script type="text/discourse-plugin" version="0.6">
  console.log(api.version)
</script>

```

The above should output `0.6`, currently it outputs `0.1`.

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [December 27, 2016, 4:58pm UTC](https://meta.discourse.org/t/customization-always-loads-pluginapi-version-0-1/54712/2 "2016-12-27T16:58:09Z")

</div>

It actually does work, but I see why this confused you. So far, we haven’t had to translate any API calls from later versions of the API to earlier ones, so we can re-use the same API object that we created the first time it was requested (for version `0.1` in this case). You are getting back an object that implements all the `0.6` methods, it was just saying it was `0.1` because that’s the first version that requested it.

Since this is confusing, I updated the plugin code to update the version to the latest version that  
requested it:

[https://github.com/discourse/discourse/commit/3786d3679cd5acd20138054f8dde3ce7a6f1ca23](https://github.com/discourse/discourse/commit/3786d3679cd5acd20138054f8dde3ce7a6f1ca23)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [March 8, 2017, 9:54am UTC](https://meta.discourse.org/t/customization-always-loads-pluginapi-version-0-1/54712/3 "2017-03-08T09:54:22Z")

</div>


