diff --git a/modules.local/ppcp-session/services.php b/modules.local/ppcp-session/services.php index d743a4a58..983c52c3f 100644 --- a/modules.local/ppcp-session/services.php +++ b/modules.local/ppcp-session/services.php @@ -13,6 +13,9 @@ return [ if (is_admin()) { return new SessionHandler(); } + if (is_null(WC()->session)) { + return new SessionHandler(); + } $result = WC()->session->get(SessionHandler::ID); if (is_a($result, SessionHandler::class)) { return $result;