Answers.Body: <p>You can use an event hook for the event <code>Cp::EVENT_REGISTER_CP_NAV_ITEMS</code> to modify the Control Panel navigation – see <a href="https://craftcms.com/docs/3.x/extend/cp-section.html" rel="nofollow noreferrer">Control Panel Sections</a> in the documentation. To determine if the site is in <code>devMode</code>, you can use the <a href="https://docs.craftcms.com/api/v3/craft-services-config.html" rel="nofollow noreferrer">config service</a>.
  Here's a little module that removes the plugin store from the navigation elements unless the site is in dev mode:</p>
  <pre class="lang-php prettyprint-override"><code>&lt;?php
  
  namespace modules\Site;
  
  use Craft;
  use craft\events\RegisterCpNavItemsEvent;
  use craft\web\twig\variables\Cp;
  use yii\base\Event;
  
  class SiteModule extends \yii\base\Module
  {
      public function init()
      {
          Event::on(
              Cp::class,
              Cp::EVENT_REGISTER_CP_NAV_ITEMS,
              function(RegisterCpNavItemsEvent $event) {
                  if (Craft::$app-&gt;config-&gt;general-&gt;devMode) return;
                  $pluginStoreIndex = array_search(
                      'plugin-store',
                      array_column($event-&gt;navItems, 'url')
                  );
                  if ($pluginStoreIndex === false) return;
                  unset($event-&gt;navItems[$pluginStoreIndex]);
              }
          );
  
          parent::init();
      }
  }
  </code></pre>
  <p>To make this work, you need to put that code into a site module and add it to the <code>bootstrap</code> section in the <code>app.php</code> config. See <a href="https://craftcms.com/docs/3.x/extend/module-guide.html" rel="nofollow noreferrer">How to Build a Module</a> for details.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-24T09:05:26.847Z
Answers.Text: I have solved this problem with your guidance, thank you so much!
Answers.UserDisplayName: Colt
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-24T12:21:44.253Z
Answers.Text: @Colt Glad I could help! Would you mind marking my answer as accepted? Thanks!
Answers.UserDisplayName: MoritzLost
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-24T15:29:00.120Z
Answers.Text: Thank you again!
Answers.UserDisplayName: Colt
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-24T07:27:06.877Z
Answers.LastActivityDate: 2021-08-24T07:58:33.227Z
Answers.LastEditDate: 2021-08-24T07:58:33.227Z
Answers.UserDisplayName: MoritzLost
Answers.Body: <p>I must say that I don't understand the rationale behind hiding the Settings in production but not the Plugin Store.</p>
  <p>The only action you can really do in production is upgrade to a Pro licence if you don't have one already, so this might be the reason but I think the link at the bottom of the page there if you need it.</p>
  <p>For me the 'allowAdminChanges' =&gt; false should also hide the Plugin Store or another trigger like 'showPluginStore' should be added.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-28T10:54:29.760Z
Answers.LastActivityDate: 2021-08-28T10:54:29.760Z
Answers.UserDisplayName: fdelaneau
Answers.Body: <p>You can also use the <a href="https://plugins.craftcms.com/cp-nav" rel="nofollow noreferrer">CP Nav plugin</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-24T09:06:48.867Z
Answers.Text: Thank you very much!
Answers.UserDisplayName: Colt
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-24T08:56:59.693Z
Answers.LastActivityDate: 2021-08-24T09:05:58.690Z
Answers.LastEditDate: 2021-08-24T09:05:58.690Z
Answers.UserDisplayName: psithu
Body: <p>I‘m a newbie and I’m learning to create simple portfolio-type sites using Craft CMS. I‘d like to remove the Plugin Store from the admin panel in the Production Environment because basically, I don't need to install plugins and the product environment plugin store is just read-only mode. I have checked the official documentation and the community without any information about it.</p>
  
Tags: <admin>
Title: Is It Possible to Hide the Plugin Store in the Production Environment?
ThreadText: # Is It Possible to Hide the Plugin Store in the Production Environment?
  
  (Asked by: username_0 on 2021-08-24)
  
  I‘m a newbie and I’m learning to create simple portfolio-type sites using Craft CMS. I‘d like to remove the Plugin Store from the admin panel in the Production Environment because basically, I don't need to install plugins and the product environment plugin store is just read-only mode. I have checked the official documentation and the community without any information about it.
  
  **Tags:** admin
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2021-08-24. Score: 2 | Accepted answer
  
  You can use an event hook for the event `Cp::EVENT_REGISTER_CP_NAV_ITEMS` to modify the Control Panel navigation – see [Control Panel Sections](https://craftcms.com/docs/3.x/extend/cp-section.html) in the documentation. To determine if the site is in `devMode`, you can use the [config service](https://docs.craftcms.com/api/v3/craft-services-config.html).
  Here's a little module that removes the plugin store from the navigation elements unless the site is in dev mode:
  
  ```php
  <?php
  
  namespace modules\Site;
  
  use Craft;
  use craft\events\RegisterCpNavItemsEvent;
  use craft\web\twig\variables\Cp;
  use yii\base\Event;
  
  class SiteModule extends \yii\base\Module
  {
      public function init()
      {
          Event::on(
              Cp::class,
              Cp::EVENT_REGISTER_CP_NAV_ITEMS,
              function(RegisterCpNavItemsEvent $event) {
                  if (Craft::$app->config->general->devMode) return;
                  $pluginStoreIndex = array_search(
                      'plugin-store',
                      array_column($event->navItems, 'url')
                  );
                  if ($pluginStoreIndex === false) return;
                  unset($event->navItems[$pluginStoreIndex]);
              }
          );
  
          parent::init();
      }
  }
  
  ```
  
  To make this work, you need to put that code into a site module and add it to the `bootstrap` section in the `app.php` config. See [How to Build a Module](https://craftcms.com/docs/3.x/extend/module-guide.html) for details.
  
  > **Comments:**
  > **username_0**: I have solved this problem with your guidance, thank you so much!  
  > **username_1**: @username_0 Glad I could help! Would you mind marking my answer as accepted? Thanks!  
  > **username_0**: Thank you again!  
  
  ---
  
  ### Answer by username_2 on 2021-08-28. Score: 2
  
  I must say that I don't understand the rationale behind hiding the Settings in production but not the Plugin Store.
  
  The only action you can really do in production is upgrade to a Pro licence if you don't have one already, so this might be the reason but I think the link at the bottom of the page there if you need it.
  
  For me the 'allowAdminChanges' => false should also hide the Plugin Store or another trigger like 'showPluginStore' should be added.
  
  
  ---
  
  ### Answer by username_3 on 2021-08-24. Score: 1
  
  You can also use the [CP Nav plugin](https://plugins.craftcms.com/cp-nav)
  
  > **Comments:**
  > **username_0**: Thank you very much!  
  
  ---
  
  