Does somebody know how to insert the first 3 images of an order into the WooCommerce my-orders table?
Additionally I would like to add an "and more"-button, linked to the specific order (same link as order-number) with an if condition.
Hint: To stay more flexible it would be nice to get a solution without hooks, if possible.
I'd like to edit even more and overwrite the my-orders.php via child-theme later.
Here is the solution I use at the moment.
<div class="order-status">
<span>Order Status</span>
<?php
elseif ( 'order-status' === $column_id ) :
$order_color_check = $order->get_status();
if($order_color_check=="completed") :
echo '<span class="order-status-value" style="color: green;">' . esc_html( wc_get_order_status_name( $order->get_status() ) ) . '</span>';
else :
echo '<span class="order-status-value" style="color: red;">' . esc_html( wc_get_order_status_name( $order->get_status() ) ) . '</span>';
endif; ?>
</div>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…