{# # My Addresses (Bootstrap 5 Override) # # Shows billing and shipping addresses as Bootstrap cards. # # WooCommerce PHP equivalent: myaccount/my-address.php # # @package WcBootstrap # @since 0.1.0 #} {% set customer_id = get_current_user_id() %} {% if not wc_ship_to_billing_address_only() and wc_shipping_enabled() %} {% set get_addresses = apply_filters('woocommerce_my_account_get_addresses', { billing: __('Billing address'), shipping: __('Shipping address') }, customer_id) %} {% else %} {% set get_addresses = apply_filters('woocommerce_my_account_get_addresses', { billing: __('Billing address') }, customer_id) %} {% endif %}

{{ apply_filters('woocommerce_my_account_my_address_description', __('The following addresses will be used on the checkout page by default.')) }}

{% for name, address_title in get_addresses %} {% set address = wc_get_account_formatted_address(name) %}
{% if address %} {{ address|wp_kses_post }} {% else %} {{ __('You have not set up this type of address yet.') }} {% endif %}
{{ do_action('woocommerce_my_account_after_my_address', name) }}
{% endfor %}