{# # Address Card Component (Bootstrap 5) # # Reusable address display card with optional edit link. # # Expected context: # title - Card header title (e.g., "Billing address") # address - Formatted address HTML string # phone - Phone number (optional) # email - Email address (optional) # edit_url - URL to edit this address (optional) # # Usage: # {% include 'components/address-card.html.twig' with { # title: 'Billing address', # address: order.get_formatted_billing_address(), # phone: order.get_billing_phone(), # email: order.get_billing_email(), # edit_url: wc_get_endpoint_url('edit-address', 'billing') # } %} # # @package WcBootstrap # @since 0.1.0 #}

{{ title|esc_html }}

{% if edit_url is defined and edit_url %} {{ __('Edit') }} {% endif %}
{% if address %} {{ address|wp_kses_post }} {% else %} {{ __('N/A') }} {% endif %} {% if phone is defined and phone %}

{{ phone|esc_html }}

{% endif %} {% if email is defined and email %}

{{ email|esc_html }}

{% endif %}