我如何设置“背订”的样式:&quot。 - wp -admin中的文字 - >订单编辑?
我需要为WooCommerce在WP-ADMIN,订单编辑页面上打印“背订”文本的样式,最好是订单编辑,以及“订单快速查看”模式。
我的问题是没有类或ID可以针对我的CSS。
<table cellspacing="0" class="display_meta">
<tbody>
// THIS FOLLOWING TR I NEED TO STYLE
<tr>
<th>Backordered:</th>
<td><p>2</p></td>
</tr>
// EOF
<tr>
<th>Cost of goods:</th>
<td><p>8,17</p></td>
</tr>
<tr>
<th>Purchase price:</th>
<td><p>8,17</p></td>
</tr>
</tbody>
</table>
我尝试使用一些这样的简单CS:
table.display_meta tr:first-child {
color: red !important;
}
这确实有效,但是问题在于您可以从附件的图像中看到。我每个产品都打印几个元字段,因此当订单有许多订购线时,每个第一个TR的孩子显然会变红。
只想将备用样式的线条使它变得足够可见,这样仓库就不会启动包装过程。
我认为我需要添加一些课程,或者也许可以使用摘要来完成此操作。但是,即使是Google也不是我的朋友。我找不到任何例子。
如果我可以解决保留固定后排序产品的正确类ID,则还可以设计整个&lt; tr class =“ item”&gt;
。
有人吗?
I need to style the TR element where Woocommerce prints the "Backordered" text in wp-admin, Order edit page, preferably for both the order edit, and for the "order quick view" modal.
My problem is that there are no classes or id to target my css to.
<table cellspacing="0" class="display_meta">
<tbody>
// THIS FOLLOWING TR I NEED TO STYLE
<tr>
<th>Backordered:</th>
<td><p>2</p></td>
</tr>
// EOF
<tr>
<th>Cost of goods:</th>
<td><p>8,17</p></td>
</tr>
<tr>
<th>Purchase price:</th>
<td><p>8,17</p></td>
</tr>
</tbody>
</table>
I tried using some simple CSS like this:
table.display_meta tr:first-child {
color: red !important;
}
And that did work, but the problem is that as you can see from the attached image; I print several meta fields per product, so when the order has many orderlines, every first tr child will obviously turn red.
I only want style the backordered line, to make it visible enough so the warehouse don't start the packing process.
I think I need to add some classes, or maybe I can do this using a snippet. But even Google is not my friend here. I can't find any examples of this.
It would also be ok to style the entire <tr class="item">
that is wrapped around the entire line if I could address the correct class ID that holds the backordered product.
Anyone?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以通过
WooCommerce_Admin_htmin_html_order_item_item_item_item_class filter filter ocy
&lt; tr&gt;
在项目的&lt; tr; tr;
中添加其他CSS类。要将其添加到订单预览模式中,您可以使用
woocommerce_admin_html_order_preview_item_class_class
filter。You can add an additional CSS class to the item's
<tr>
when the item contains any item meta with a meta key of 'Backordered', via thewoocommerce_admin_html_order_item_class
filter.To also add it to the order preview modal you can use the
woocommerce_admin_html_order_preview_item_class
filter.