# Plugin development: site settings "enabled" checkbox not working

**URL:** <https://meta.discourse.org/t/plugin-development-site-settings-enabled-checkbox-not-working/65460>\
**Category:** Development\
**Created:** [July 2, 2017, 10:37am UTC](https://meta.discourse.org/t/plugin-development-site-settings-enabled-checkbox-not-working/65460 "2017-07-02T10:37:09Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![leo.proctor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/leo.proctor/32/216158_2.png) [@leo.proctor](https://meta.discourse.org/u/leo.proctor)\
**Post date:** [January 28, 2018, 9:46am UTC](https://meta.discourse.org/t/plugin-development-site-settings-enabled-checkbox-not-working/65460/4 "2018-01-28T09:46:33Z")

</div>

I face similar issue.

```
enabled_site_setting :myplugin_enabled
after_initialize do
  ::Topic.class_eval do
    after_commit do
      #myplugin code
    end
end

```

No matter if `myplugin_enabled` is true/false, myplugin code is executed. I don’t see any use for `enabled_site_setting` either. Can anyone explain what exactly it is? How can I enable/disable myplugin code based on myplugin\_enabled value?

---

_[View the full topic](https://meta.discourse.org/t/plugin-development-site-settings-enabled-checkbox-not-working/65460)._
