1. Home
  2. Knowledge Base
  3. WooCommerce Product Add-Ons Ultimate
  4. Hide field types in order data
  1. Home
  2. Knowledge Base
  3. Orders
  4. Hide field types in order data
  1. Home
  2. Knowledge Base
  3. Advanced
  4. Hide field types in order data

Hide field types in order data

If you want to hide certain field types, e.g. calculation fields, from being displayed in order data, use the following snippet:

<?php
/**
* Prevent some field types from being displayed in order data
*/
function prefix_hidden_group_types_in_order( $group_types ) {
$group_types = array( 'calculation' );
return $group_types;
}
add_filter( 'pewc_hidden_group_types_in_order', 'prefix_hidden_group_types_in_order' );

You can add this snippet by following these steps.

Find out how to hide field types in the cart and checkout here.

Was this article helpful?

Need More Support?

If you can't find the answer that you're looking for, then please use the link below to raise a support ticket.
Contact Support

Related Articles