app/views/spree/checkout/_payment.html.erb in spree_frontend-4.1.15 vs app/views/spree/checkout/_payment.html.erb in spree_frontend-4.2.0.beta
- old
+ new
@@ -6,16 +6,16 @@
<div data-hook="checkout_payment_step">
<%= render partial: 'spree/checkout/payment/storecredit' %>
<ul id="payment-method-fields" class="list-unstyled position-relative" data-hook>
- <% @order.available_payment_methods.each do |method| %>
+ <% checkout_available_payment_methods.each do |method| %>
<li class="radio">
<%= label_tag '', class: "form-check-label spree-radio-label payment-option", data: { type: method.id == @payment_sources&.first&.payment_method_id ? 'card' : nil } do %>
<%= radio_button_tag "order[payments_attributes][][payment_method_id]",
method.id,
- method.id == @order.payments.checkout.last&.payment_method_id || method == @order.available_payment_methods.first %>
+ method.id == @order.payments.checkout.last&.payment_method_id || method == checkout_available_payment_methods.first %>
<span class="spree-radio-label-custom-input"></span>
<%= Spree.t(method.name, scope: :payment_methods, default: method.name) %>
<% end %>
</li>
<% end %>
@@ -41,11 +41,11 @@
</div>
</div>
<% end %>
<ul id="payment-methods" class="list-unstyled position-relative mb-0 payment-sources-add-form" data-hook>
- <% @order.available_payment_methods.each do |method| %>
- <li id="payment_method_<%= method.id %>" class="<%= 'last' if method == @order.available_payment_methods.last %>" data-hook>
+ <% checkout_available_payment_methods.each do |method| %>
+ <li id="payment_method_<%= method.id %>" class="<%= 'last' if method == checkout_available_payment_methods.last %>" data-hook>
<fieldset>
<%= render partial: "spree/checkout/payment/#{method.method_type}", locals: { payment_method: method } %>
</fieldset>
</li>
<% end %>