Answer the question
In order to leave comments, you need to log in
Why doesn't the value in WC->session change?
I want to set a value to the WC session, I wrote a function:
function set_user_type_func()
{
$temp = isset($_REQUEST['user_type']) ? $_REQUEST['user_type'] : '';
if ($temp) {
WC()->session->set('user_type', $temp);
}
die();
}
add_action('wp_ajax_set_user_type', 'set_user_type_func');
add_action('wp_ajax_nopriv_set_user_type', 'set_user_type_func');
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question