本文介紹了如何在WooCommerce“我的賬戶"中插入訂單的前3張產品圖片訂單表的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
限時送ChatGPT賬號..
有人知道如何將訂單的前 3 張圖片插入 WooCommerce my-orders 表嗎?
Does somebody know how to insert the first 3 images of an order into the WooCommerce my-orders table?
另外,我想添加一個和更多"按鈕,使用 if 條件鏈接到特定訂單(與訂單號相同的鏈接).
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.
我想編輯更多,稍后通過 child-theme 覆蓋 my-orders.php.
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>
<span>訂單狀態</span><?phpelseif ( '訂單狀態' === $column_id ) :$order_color_check = $order->get_status();如果($order_color_check==已完成"):echo ''.esc_html( wc_get_order_status_name( $order->get_status() ) ) .'</span>';別的 :echo '".esc_html( wc_get_order_status_name( $order->get_status() ) ) .'</span>';萬一;?>
推薦答案
- 知道
這篇關于如何在WooCommerce“我的賬戶"中插入訂單的前3張產品圖片訂單表的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!