Skip to content

Commit d86fa64

Browse files
committed
Wording fix
1 parent 81ed245 commit d86fa64

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/services/Discounts.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -474,17 +474,17 @@ public function orderCouponAvailable(Order $order, string &$explanation = null):
474474
}
475475

476476
if ($discount->hasCustomerCondition() && (!$order->getCustomer() || !$discount->getCustomerCondition()->matchElement($order->getCustomer()))) {
477-
$explanation = Craft::t('commerce', 'Coupon can not apply discount to this order due to customer.');
477+
$explanation = Craft::t('commerce', 'Coupon can not apply discount to this order due to customer mismatch.');
478478
return false;
479479
}
480480

481481
if ($discount->hasShippingAddressCondition() && (!$order->getShippingAddress() || !$discount->getShippingAddressCondition()->matchElement($order->getShippingAddress()))) {
482-
$explanation = Craft::t('commerce', 'Coupon can not apply discount to this order due to address.');
482+
$explanation = Craft::t('commerce', 'Coupon can not apply discount to this order due to address mismatch.');
483483
return false;
484484
}
485485

486486
if ($discount->hasBillingAddressCondition() && (!$order->getBillingAddress() || !$discount->getBillingAddressCondition()->matchElement($order->getBillingAddress()))) {
487-
$explanation = Craft::t('commerce', 'Coupon can not apply discount to this order due to address.');
487+
$explanation = Craft::t('commerce', 'Coupon can not apply discount to this order due to address mismatch.');
488488
return false;
489489
}
490490

src/translations/en/commerce.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,8 +1336,8 @@
13361336
'billing address' => 'billing address',
13371337
'donation' => 'donation',
13381338
'Coupon can not apply discount to this order.' => 'Coupon can not apply discount to this order.',
1339-
'Coupon can not apply discount to this order due to address.' => 'Coupon can not apply discount to this order due to address.',
1340-
'Coupon can not apply discount to this order due to customer.' => 'Coupon can not apply discount to this order due to customer.',
1339+
'Coupon can not apply discount to this order due to address mismatch.' => 'Coupon can not apply discount to this order due to address mismatch.',
1340+
'Coupon can not apply discount to this order due to customer mismatch.' => 'Coupon can not apply discount to this order due to customer mismatch.',
13411341
'donations' => 'donations',
13421342
'info' => 'info',
13431343
'inventory location' => 'inventory location',

0 commit comments

Comments
 (0)