title: Cookies not available when not logged in with Wordpress
body: <p>I'm trying to set a cookie in PHP using the <code>setcookie()</code> function.</p>
  
  <p>My code is as follows:</p>
  
  <p><code>setcookie('key', $key, time() + (86400 * 365), '/');</code></p>
  
  <p>I'm using an action hook to show all cookies after the theme is loaded using the following code:</p>
  
  <pre><code>function set_devsource_cookie() {
  
      if($_SERVER['REMOTE_ADDR'] == "THE IP") {
          print_r($_COOKIE);
      }
  
  }
  
  add_action( 'after_setup_theme', 'set_devsource_cookie', 0 );
  </code></pre>
  
  <p>When logged in to Wordpress this shows the all the cookies as expected, but when I'm not logged in to Wordpress it shows an empty array.</p>
  
  <p><strong>Note that I am using WPEngine as my host, but that caching is disabled.</strong></p>