[英]Hide general and shipping details when adding a new order in Woocommerce admin
In the admin page when you press "add new order" there is General Details, Billing Details and Shipping Details: 在管理页面中,当您按“添加新订单”时,将显示“常规详细信息”,“计费详细信息”和“运输详细信息”:
I would love to hide some these with CSS. 我想用CSS隐藏其中一些。 I've tried all day but have been able to achieve this unsuccessfully. 我一整天都在尝试,但未能成功实现。
I just want to keep the Billing details visible. 我只想使“ 帐单”详细信息可见。 Is that possible? 那可能吗?
This can be done simply with the following hooked function and some specific CSS rules: 只需使用以下挂钩函数和一些特定的CSS规则即可完成此操作:
add_action('admin_head', 'my_admin_head');
function my_admin_head() {
?>
<style>
.post-new-php.post-type-shop_order #postbox-container-2 .order_data_column_container > .order_data_column:first-child,
.post-new-php.post-type-shop_order #postbox-container-2 .order_data_column_container > .order_data_column:last-child {
display:none !important;
}
</style>
<?php
}
Code goes in function.php file of your active child theme (or active theme). 代码进入您的活动子主题(或活动主题)的function.php文件中。
Tested and works… 经过测试并可以工作…
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.