title: How to use add_action to hook a static method from other Class
body: <p>I tried to use hook to call a static method, but it failed.</p>
  
  <p>I add the action in test.php like this</p>
  
  <pre><code> require_once('class.test.php');
   add_action('register_new_user', array('Test','auto_signin'),20);
  </code></pre>
  
  <p>and my auto_signin function put in class.test.php file:
       
  
  <pre><code> namespace MyTest;
   echo(12);
   class Test {
      function __construct()
      {
  
      }
  
      public static function auto_signin()
      {
         echo('hello');
         die();
      }
    }
  </code></pre>
  
  <p>when I debuged it, the hook register_new_user did execute and from the global variable wp_filters, the auto_signin function had been added to register_new_user, but the function never executed.</p>