Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter( 'woocommerce_get_item_data', 'filter_extra_data_display', 99, 3 );
- function filter_extra_data_display( $item_data, $cart_item ) {
- foreach ( $item_data as $key => $data ) {
- if ( ! array_key_exists( 'display', $data ) && $data['hidden'] !== 1 && is_array( $data['value'] ) ) {
- $item_data[ $key ]['hidden'] = 1;
- }
- }
- return $item_data;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement