chore: fix typo

This commit is contained in:
Maël Gangloff
2024-08-10 00:27:30 +02:00
parent 18886609ff
commit 644915446b
3 changed files with 9 additions and 3 deletions

View File

@@ -22,6 +22,6 @@ export const ovhPricingMode = () => [
{value: 'create-default', label: t`The domain is free and at the standard price`}, {value: 'create-default', label: t`The domain is free and at the standard price`},
{ {
value: 'create-premium', value: 'create-premium',
label: t`The domain is free but is a premium. Its price varies from one domain to another` label: t`The domain is free but can be premium. Its price varies from one domain to another`
} }
] ]

View File

@@ -74,9 +74,15 @@ readonly class OvhConnector implements ConnectorInterface
$offers = $conn->get("/order/cart/{$cartId}/domain", [ $offers = $conn->get("/order/cart/{$cartId}/domain", [
'domain' => $ldhName, 'domain' => $ldhName,
]); ]);
$pricingModes = ['create-premium'];
if ('create-premium' !== $authData['pricingMode']) {
$pricingModes[] = $authData['pricingMode'];
}
$offer = array_filter($offers, fn ($offer) => 'create' === $offer['action'] $offer = array_filter($offers, fn ($offer) => 'create' === $offer['action']
&& true === $offer['orderable'] && true === $offer['orderable']
&& $offer['pricingMode'] === $authData['pricingMode'] && in_array($offer['pricingMode'], $pricingModes)
); );
if (empty($offer)) { if (empty($offer)) {
$conn->delete("/order/cart/{$cartId}"); $conn->delete("/order/cart/{$cartId}");

View File

@@ -537,7 +537,7 @@ msgstr ""
#: assets/utils/providers/ovh.tsx:25 #: assets/utils/providers/ovh.tsx:25
msgid "" msgid ""
"The domain is free but is a premium. Its price varies from one domain to " "The domain is free but can be premium. Its price varies from one domain to "
"another" "another"
msgstr "" msgstr ""