if shoppingcart APIv2 request fails, unset session variable
This commit is contained in:
parent
05d1ee9667
commit
05375dde05
@ -111,6 +111,9 @@ function fulcrm_shoppingcart_get_session_cart( $create = true ) {
|
||||
if ( ( $api_data[ 'data' ][ 'completed' ] === null ) && ( $api_data[ 'data' ][ 'abandoned' ] === null ) ) {
|
||||
return $api_data[ 'data' ];
|
||||
}
|
||||
} else {
|
||||
if ( $api_data[ 'code' ] === 404 )
|
||||
unset( $_SESSION[ 'fulcrm_shoppingcart_id' ] );
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user