• Hi. In First – thanks for greate work.

    Say me please (divide), how I can separate time cart expiration for guest (example 10 minuts) and for loginet user (example 24 haurs)

    I think in thise file woocommerce-cart-stock-reducer/includes/class-wc-csr-session.php :
    somesing like thise:

    
    public function set_session_expiration() {
    
    if(is_user_logged_in()){
    		$this->_session_expiring   = time() + intval( apply_filters( 'wc_session_expiring', 60 * 60 * 24) ); // set- MY VALUE
    }
    else if(!is_user_logged_in())
    {
    	$this->_session_expiring   = time() + intval( apply_filters( 'wc_session_expiring', 60 * 10) ); // set- MY VALUE 10 minuts
    }
    ets....
    		$this->_session_expiration = time() + intval( apply_filters( 'wc_session_expiration', 60 * 60 * 48 ) ); // 48 Hours.
    	}
    

    Its right way?
    And I cant understand why in plugin file set values – https://i.imgur.com/UhcREf1.png

    thanks for help

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Separate logic for guest and logined users’ is closed to new replies.