How to set session variable in woocommerce?

WC()->session->set( ‘myvar’,”10″);