diff --git a/src/GiftVoucher.php b/src/GiftVoucher.php index ae063bd..f9710f3 100755 --- a/src/GiftVoucher.php +++ b/src/GiftVoucher.php @@ -192,8 +192,8 @@ private function _registerPermissions() $voucherTypePermissions = []; - foreach ($voucherTypes as $id => $voucherType) { - $suffix = ':' . $uid; + foreach ($voucherTypes as $voucherType) { + $suffix = ':' . $voucherType->uid; $voucherTypePermissions['giftVoucher-manageVoucherType' . $suffix] = ['label' => Craft::t('gift-voucher', 'Manage “{type}” vouchers', ['type' => $voucherType->name])]; }