这些帖子与Add a custom total line to WooCommerce admin order totals有关
你好
我正在try 隐藏小计,但在css中找不到类,如下所示:
.cart-subtotal { display: none; }
.order-total { display: none; }
.order_shipping_line_items {display: none;}
这不管用.
现在我试图用这些代码取消设置,但它也不起作用:
add_filter( 'woocommerce_get_order_item_totals', 'reordering_order_item_totals', 10, 3 );
function reordering_order_item_totals( $total_rows, $order, $tax_display ){
$shipping = $total_rows['line_subtotal'];
$order_total = $total_rows['order_total'];
unset($total_rows['line_subtotal']);
unset($total_rows['order_total']);
return $total_rows;
}
我try 按照请求的顺序对字段重新排序并隐藏字段.