1. Home
  2. Knowledge Base
  3. WooCommerce Product Add-Ons Ultimate
  4. Cart
  5. Hide field types in cart and checkout
  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. Advanced Topics for Add-Ons Ultimate
  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?

Related Articles