![](/img/trans.png)
[英]Disabling the editing of the order shipping details by admin in WooCommerce backend
[英]Hide general and shipping details when adding a new order in Woocommerce admin
只需使用以下掛鈎函數和一些特定的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
}
代碼進入您的活動子主題(或活動主題)的function.php文件中。
經過測試並可以工作…
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.