<?php
/**
* My Orders - Deprecated
*
* @deprecated 2.6.0 this template file is no longer used. My Account shortcode uses orders.php.
* @package WooCommerce\\Templates
*/
defined( \'ABSPATH\' ) || exit;
$customer_orders = get_posts(
apply_filters(
\'woocommerce_my_account_my_orders_query\',
array(
\'numberposts\' => $order_count,
\'meta_key\' => \'_customer_user\',
\'meta_value\' => get_current_user_id(),
\'post_type\' => wc_get_order_types( \'view-orders\' ),
\'post_status\' => \'wc-processing\',
)
)
);
if ( $customer_orders ) : ?>
<div id="active-orders" class="ras__item">
<p class="title">Активные заказы</p>
<div class="ras-table">
<div class="ras-thead">
<div class="ras-tr">
<span class="ras-td">Дата заказа</span>
<span class="ras-td">Номер заказа</span>
<span class="ras-td">Статус</span>
<span class="ras-td">Доставка</span>
<span class="ras-td">Сумма</span>
<span class="ras-td">Залог</span>
</div>
</div>
<div class="ras-tbody">
<?php
foreach ( $customer_orders as $customer_order ) :
$order = wc_get_order( $customer_order ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
$item_count = $order->get_item_count();
?>
<div class="ras-tr">
<span class="ras-td"><time datetime="<?php echo esc_attr( $order->get_date_created()->date( \'c\' ) ); ?>"><?php echo esc_html( wc_format_datetime( $order->get_date_created() ) ); ?></time></span>
<span class="ras-td"><a href="<?php echo esc_url( $order->get_view_order_url() ); ?>"><?php echo _x( \'#\', \'hash before order number\', \'woocommerce\' ) . $order->get_order_number(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></a></span>
<span class="ras-td status orange"><?php echo esc_html( wc_get_order_status_name( $order->get_status() ) ); ?></span>
<span class="ras-td"><?echo $order->get_shipping_method();?></span>
<span class="ras-td"><?php
/* translators: 1: formatted order total 2: total order items */
printf( _n( \'%1$s\', \'%1$s\', $item_count, \'woocommerce\' ), $order->get_formatted_order_total(), $item_count ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
?></span>
<span class="ras-td"><?php printf( get_field( \'zalog\', $order_id ) ); ?></span>
<span class="ras-td read-more">
<?php
$actions = wc_get_account_orders_actions( $order );
if ( ! empty( $actions ) ) {
foreach ( $actions as $key => $action ) { // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
echo \'<a href="\' . esc_url( $action[\'url\'] ) . \'" class="button \' . sanitize_html_class( $key ) . \'">\' . esc_html(\'Подробнее\') . \'</a>\';
}
}
?>
</span>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
<?php endif; ?>
<div id="archive-orders" class="ras__item">
<p class="title">Архив заказов</p>
<div class="ras-table">
<div class="ras-thead">
<div class="ras-tr">
<span class="ras-td">Дата заказа</span>
<span class="ras-td">Номер заказа</span>
<span class="ras-td">Статус</span>
<span class="ras-td">Доставка</span>
<span class="ras-td">Сумма</span>
<span class="ras-td">Залог</span>
</div>
</div>
<div class="ras-tbody">
<div class="ras-tr">
<span class="ras-td">02.10.2020</span>
<span class="ras-td">#1001005</span>
<span class="ras-td status">Выполнен</span>
<span class="ras-td">Самовывоз</span>
<span class="ras-td">20 000 ₽</span>
<span class="ras-td">5 000 ₽</span>
<span class="ras-td read-more">
<a href="">Подробнее</a>
</span>
</div>
<div class="ras-tr">
<span class="ras-td">02.10.2020</span>
<span class="ras-td">#1001005</span>
<span class="ras-td status">Выполнен</span>
<span class="ras-td">Самовывоз</span>
<span class="ras-td">20 000 ₽</span>
<span class="ras-td">5 000 ₽</span>
<span class="ras-td read-more">
<a href="">Подробнее</a>
</span>
</div>
<div class="ras-tr">
<span class="ras-td">02.10.2020</span>
<span class="ras-td">#1001005</span>
<span class="ras-td status">Выполнен</span>
<span class="ras-td">Самовывоз</span>
<span class="ras-td">20 000 ₽</span>
<span class="ras-td">5 000 ₽</span>
<span class="ras-td read-more">
<a href="">Подробнее</a>
</span>
</div>
</div>
</div>
</div>
</div>
</section>
CSS在循环外部被破坏