WP_Session variables are being lost
-
I am curently using WP_Session manager to manage global variables that I want to share between pages.
I can set, pass and view WP_session variables between my standard wordpress pages.
However I have a requirement to post data to a php file I created called checkout_manager.php.When I attempt to retrieve the session data using the code below, nothing is being retrieved.
Any help would be greatly appreciated.
$cart=array();
if (isset($wp_session))
{
if (isset($wp_session[‘cart’]))
{
$cart=$wp_session[‘cart’]->toArray();
$count=count($cart);
}
}
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘WP_Session variables are being lost’ is closed to new replies.