Body: <p>I'm trying to add custom actions to the order page. Following the documentation on hooks and Element Actions, I did this</p>
  
  <p>In my main plugin file (OrderExporterPlugin.php)</p>
  
  <pre><code>public function commerce_addOrderActions($source)
  {
      return array(
          new OrderExporter_ExportElementAction()
      );
  }
  </code></pre>
  
  <p>In the folder elementactions (OrderExporter_ExportElementAction.php)</p>
  
  <pre><code>class OrderExporter_ExportElementAction extends BaseElementAction {
  
     public function getName()
     {
      return Craft::t('Export file');
     }
  </code></pre>
  
  <p>}</p>
  
  <p>The hook is active, but sends an error with the message "Class 'Craft\OrderExporter_ExportElementAction' not found" when trying to access that class</p>
  
  <p>My IDE recognizes the class, so I think the namespaces are fine</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-18T21:07:37.017Z
Comments.Text: Have you `require`'d the `OrderExporter_ExportElementAction` at some point in the request?  It won't get autoloaded for you.
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-12-23T12:40:56.290Z
Comments.Text: Perhaps I’m just being an idiot but I think it would be useful to note in the docs that element actions need to be explicitly required, as most other plugin classes seem to autoload.
Comments.UserDisplayName: Dom Stubbs
Tags: <plugin-development><plugin-craftcommerce>
Title: Adding custom actions to Craft Commerce orders page
ThreadText: # Adding custom actions to Craft Commerce orders page
  
  (Asked by: username_0 on 2017-01-18)
  
  I'm trying to add custom actions to the order page. Following the documentation on hooks and Element Actions, I did this
  
  In my main plugin file (OrderExporterPlugin.php)
  
  ```
  public function commerce_addOrderActions($source)
  {
      return array(
          new OrderExporter_ExportElementAction()
      );
  }
  
  ```
  
  In the folder elementactions (OrderExporter\_ExportElementAction.php)
  
  ```
  class OrderExporter_ExportElementAction extends BaseElementAction {
  
     public function getName()
     {
      return Craft::t('Export file');
     }
  
  ```
  
  }
  
  The hook is active, but sends an error with the message "Class 'Craft\OrderExporter\_ExportElementAction' not found" when trying to access that class
  
  My IDE recognizes the class, so I think the namespaces are fine
  
  **Tags:** plugin-development, plugin-craftcommerce
  
  > **Comments:**
  > **username_1**: Have you `require`'d the `OrderExporter_ExportElementAction` at some point in the request?  It won't get autoloaded for you.  
  > **username_2**: Perhaps I’m just being an idiot but I think it would be useful to note in the docs that element actions need to be explicitly required, as most other plugin classes seem to autoload.  
  
  ---
  
  ## 0 answers
  
  