Skip to content

Commit 15ddcbd

Browse files
committed
Fixed a bug where example templates didn't filter available gateways by order and address conditions
1 parent 143e76f commit 15ddcbd

File tree

5 files changed

+5
-4
lines changed

5 files changed

+5
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- Fixed a bug where setting the `COMMERCE_PAYMENT_CURRENCY` constant would not override the cart’s payment currency.
99
- Fixed a bug where tax and shipping category dropdowns on variants weren’t respecting product type restrictions. ([#4258](https://github.com/craftcms/commerce/issues/4258))
1010
- Fixed the missing billing and shipping address conditions on the gateway edit page. ([#4259](https://github.com/craftcms/commerce/pull/4259))
11+
- Fixed a bug where example templates didn't filter available gateways by order and address conditions.
1112

1213
## 5.6.0 - 2026-03-11
1314

example-templates/dist/shop/checkout/pay-static.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
{% set paymentSources = craft.commerce.paymentSources.getAllPaymentSourcesByCustomerId(currentUser.id) %}
9797
{% endif %}
9898

99-
{% set availableGateways = craft.commerce.gateways.allCustomerEnabledGateways %}
99+
{% set availableGateways = cart.availableGateways %}
100100

101101
{% if availableGateways|length %}
102102
<form action="" method="get" class="form-inline">

example-templates/dist/shop/checkout/payment-method.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{% set paymentSources = craft.commerce.paymentSources.getAllPaymentSourcesByCustomerId(currentUser.id ?? null) %}
44

55
{% block main %}
6-
{% set availableGateways = craft.commerce.gateways.getAllCustomerEnabledGateways(cart.storeId) %}
6+
{% set availableGateways = cart.availableGateways %}
77

88
<!-- Template: {{ _self }}.twig -->
99
<div class="md:flex md:-mx-8">

example-templates/src/shop/checkout/pay-static.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
{% set paymentSources = craft.commerce.paymentSources.getAllPaymentSourcesByCustomerId(currentUser.id) %}
9797
{% endif %}
9898

99-
{% set availableGateways = craft.commerce.gateways.allCustomerEnabledGateways %}
99+
{% set availableGateways = cart.availableGateways %}
100100

101101
{% if availableGateways|length %}
102102
<form action="" method="get" class="form-inline">

example-templates/src/shop/checkout/payment-method.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{% set paymentSources = craft.commerce.paymentSources.getAllPaymentSourcesByCustomerId(currentUser.id ?? null) %}
44

55
{% block main %}
6-
{% set availableGateways = craft.commerce.gateways.getAllCustomerEnabledGateways(cart.storeId) %}
6+
{% set availableGateways = cart.availableGateways %}
77

88
<!-- Template: {{ _self }}.twig -->
99
<div class="md:flex md:-mx-8">

0 commit comments

Comments
 (0)