If you want to hide certain field types, e.g. calculation fields, from being displayed in order data, use the following snippet:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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.
Related Articles
-
Populate add-on field options with user fields
- Plugin: WooCommerce Product Add-Ons Ultimate, WooCommerce Members Only
- Content Type: Support Document
-
Display order meta in Web Toffee Invoice and Packing Slip plugin
- Plugin: WooCommerce Product Add-Ons Ultimate
- Content Type: Support Document
-
Exclude product IDs from global groups
- Plugin: WooCommerce Product Add-Ons Ultimate
- Content Type: Support Document
-
How to edit add-ons in existing orders
- Plugin: WooCommerce Product Add-Ons Ultimate
- Content Type: Support Document
-
Hide add-on prices for all fields in the order and order confirmation email
- Plugin: WooCommerce Product Add-Ons Ultimate
- Content Type: Support Document
-
Enable editing of add-ons from the cart
- Plugin: WooCommerce Product Add-Ons Ultimate
- Content Type: Support Document