I have a couple of order item meta details that I would not like the customer to see (on the view orders page under account info). I have found a filter that will remove this data from the ADMIN (where I would still like to see it), but can't find a similar filter to remove it from the FRONT END (where it should be hidden).
Here is the code that will (uselessly, for me) remove it from the back end admin:
add_filter( 'woocommerce_hidden_order_itemmeta', 'add_hidden_order_items' );
function add_hidden_order_items( $order_items ) {
$order_items[] = 'paid_already';
$order_items[] = 'variation_sku';
// and so on...
return $order_items;
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire