1. Home
  2. Knowledge Base
  3. WooCommerce Product Add-Ons Ultimate
  4. Hide field types in cart and checkout
  1. Home
  2. Knowledge Base
  3. Cart
  4. Hide field types in cart and checkout
  1. Home
  2. Knowledge Base
  3. Front End
  4. Hide field types in cart and checkout
  1. Home
  2. Knowledge Base
  3. Advanced
  4. Hide field types in cart and checkout

Hide field types in cart and checkout

You can keep certain field types hidden in the cart and the checkout if you wish:

<?php
/**
* Hide certain field types in the cart and checkout
*/
function tester_hidden_field_types_in_cart( $field_types ) {
$field_types = array( 'calculation', 'number' );
return $field_types;
}
add_filter( 'pewc_hidden_field_types_in_cart', 'tester_hidden_field_types_in_cart' );

You can see how to add this snippet here.

You can also see how to hide field types in order data 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