title: Fatal error: Uncaught Error: Using $this when not in object context
body: <pre><code>class Affiliates_Shortcodes {
  
      private $earnings;
  
  
      public static function affiliates_user_tree() {
  
  echo $this-&gt;earnings;
  
          }   
      }
  </code></pre>
  
  <p>Getting error:</p>
  
  <blockquote>
    <p>Fatal error: Uncaught Error: Using $this when not in object context</p>
  </blockquote>