{# # Payment Methods (Bootstrap 5 Override) # # Shows saved payment methods on the account page. # # WooCommerce PHP equivalent: myaccount/payment-methods.php # # @package WcBootstrap # @since 0.1.0 #} {% set saved_methods = wc_get_customer_saved_methods_list(get_current_user_id()) %} {% set has_methods = saved_methods is not empty %} {{ do_action('woocommerce_before_account_payment_methods', has_methods) }} {% if has_methods %}
| {{ column_name|esc_html }} | {% endfor %}
|---|
|
{% if column_id == 'method' %}
{% if method.method.last4 is defined and method.method.last4 %}
{{ __('%1$s ending in %2$s')|format(wc_get_credit_card_type_label(method.method.brand)|esc_html, method.method.last4|esc_html) }}
{% else %}
{{ wc_get_credit_card_type_label(method.method.brand)|esc_html }}
{% endif %}
{% if method.is_default|default(false) %}
{{ __('Default') }}
{% endif %}
{% elseif column_id == 'expires' %}
{{ method.expires|esc_html }}
{% elseif column_id == 'actions' %}
{% for key, action in method.actions %}
{{ action.name|esc_html }}
{% endfor %}
{% else %}
{{ do_action('woocommerce_account_payment_methods_column_' ~ column_id, method) }}
{% endif %}
|
{% endfor %}