有人知道如何将订单的前 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>
这篇关于如何在WooCommerce“我的账户"中插入订单的前3张产品图片订单表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
以编程方式将可下载文件添加到 Woocommerce 产品Add programmatically a downloadable file to Woocommerce products(以编程方式将可下载文件添加到 Woocommerce 产品)
获取今天 Woocommerce 中每种产品的总订单数Get today#39;s total orders count for each product in Woocommerce(获取今天 Woocommerce 中每种产品的总订单数)
在 WooCommerce 和电话字段验证问题中添加自定义注Add Custom registration fields in WooCommerce and phone field validation issue(在 WooCommerce 和电话字段验证问题中添加自定义注册字段
在 Woocommerce 简单产品中添加一个将更改价格的选Add a select field that will change price in Woocommerce simple products(在 Woocommerce 简单产品中添加一个将更改价格的选择字段)
在 WooCommerce 3 中将自定义列添加到管理产品列表Add custom columns to admin products list in WooCommerce 3(在 WooCommerce 3 中将自定义列添加到管理产品列表)
自定义结帐“下订单"按钮输出htmlCustomizing checkout quot;Place Orderquot; button output html(自定义结帐“下订单按钮输出html)