simplyfy session factory

This commit is contained in:
David Remer 2020-04-09 11:10:38 +03:00
parent 0ef75351cc
commit b0acc20435

View file

@ -10,9 +10,6 @@ use Inpsyde\PayPalCommerce\Session\Cancellation\CancelView;
return [
'session.handler' => function (ContainerInterface $container) : SessionHandler {
if (is_admin()) {
return new SessionHandler();
}
if (is_null(WC()->session)) {
return new SessionHandler();
}