@@ -60,7 +60,7 @@ public function whenAuthenticated(MunicipioAuthenticatedUserInterface $user, Mun
6060 'days ' => $ this ->wpService ->__ ('Days ' , 'municipio ' ),
6161 'yourCultureCard ' => $ this ->wpService ->__ ('Your Kulturkort ' , 'municipio ' ),
6262 ],
63- 'actions ' => $ this ->getActions ($ navigation ),
63+ 'actions ' => $ this ->getActions ($ navigation, true ),
6464 'profile ' => [
6565 'firstname ' => $ ticket ['firstname ' ] ?? '' ,
6666 'lastname ' => $ ticket ['lastname ' ] ?? '' ,
@@ -131,7 +131,7 @@ private function formatDate(mixed $date): ?string
131131 return $ time ? date (DateFormat::getDateFormat ('date ' ), $ time ) : null ;
132132 }
133133
134- private function getActions (MunicipioAuthNavigationInterface $ navigation ): array
134+ private function getActions (MunicipioAuthNavigationInterface $ navigation, bool $ hasValidKulturkort = false ): array
135135 {
136136 $ actions = [];
137137 if (!empty ($ this ->attributes ['profileLink ' ] ?? '' )) {
@@ -142,6 +142,14 @@ private function getActions(MunicipioAuthNavigationInterface $navigation): array
142142 );
143143 }
144144
145+ if (!empty ($ this ->attributes ['renewLink ' ] ?? '' )) {
146+ $ actions [] = ActionCreator::create (
147+ $ hasValidKulturkort ? $ this ->wpService ->__ ('Renew ' , 'municipio ' ) : $ this ->wpService ->__ ('Buy ' , 'municipio ' ),
148+ $ this ->attributes ['renewLink ' ],
149+ 'shopping_cart '
150+ );
151+ }
152+
145153 $ actions [] = ActionCreator::create (
146154 $ this ->wpService ->__ ('Logout ' , 'municipio ' ),
147155 $ navigation ->getModifiedHomeUrl (addQueryArgs: ['action ' => 'logout ' ]),
0 commit comments