You've already forked wc-bootstrap
46 lines
1.5 KiB
Twig
46 lines
1.5 KiB
Twig
|
|
{#
|
||
|
|
# View Order (Bootstrap 5 Override)
|
||
|
|
#
|
||
|
|
# Shows details of a specific order on the account page.
|
||
|
|
# HPOS compatible: uses WC_Order methods only.
|
||
|
|
#
|
||
|
|
# Expected context:
|
||
|
|
# order_id - Order ID
|
||
|
|
# order - WC_Order object
|
||
|
|
#
|
||
|
|
# WooCommerce PHP equivalent: myaccount/view-order.php
|
||
|
|
#
|
||
|
|
# @package WcBootstrap
|
||
|
|
# @since 0.1.0
|
||
|
|
#}
|
||
|
|
|
||
|
|
{% set notes = order.get_customer_order_notes() %}
|
||
|
|
|
||
|
|
<p>
|
||
|
|
{{ __('Order #%1$s was placed on %2$s and is currently %3$s.')|format(
|
||
|
|
'<mark class="order-number">' ~ order.get_order_number() ~ '</mark>',
|
||
|
|
'<mark class="order-date">' ~ wc_format_datetime(order.get_date_created()) ~ '</mark>',
|
||
|
|
'<mark class="order-status">' ~ wc_get_order_status_name(order.get_status()) ~ '</mark>'
|
||
|
|
)|wp_kses_post }}
|
||
|
|
</p>
|
||
|
|
|
||
|
|
{% if notes %}
|
||
|
|
<h2 class="h5 mt-4 mb-3">{{ __('Order updates') }}</h2>
|
||
|
|
<div class="list-group mb-4">
|
||
|
|
{% for note in notes %}
|
||
|
|
<div class="list-group-item">
|
||
|
|
<div class="d-flex justify-content-between align-items-center mb-1">
|
||
|
|
<small class="text-body-secondary">
|
||
|
|
{{ date_i18n(__('l jS \\o\\f F Y, h:ia'), strtotime(note.comment_date)) }}
|
||
|
|
</small>
|
||
|
|
</div>
|
||
|
|
<div class="mb-0">
|
||
|
|
{{ wpautop(wptexturize(note.comment_content))|raw }}
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
{% endfor %}
|
||
|
|
</div>
|
||
|
|
{% endif %}
|
||
|
|
|
||
|
|
{{ do_action('woocommerce_view_order', order_id) }}
|