Filtering out specific meta keys for order line items?
-
Hello, I’m trying to remove specific meta keys from the generated invoices/package slips for each order line item. I see the code gets all meta data in
get_order_items
through$data['meta'] = wc_display_item_meta( $item, array( 'echo' => false, ) );
It’s possible to filter out specific meta keys with the filter
woocommerce_order_item_get_formatted_meta_data
(https://stackoverflow.com/a/52684694) – however, I do not want to filter out the meta keys in the admin interface, but only on the generated invoices/package slips.Does the plugin offer some kind of conditional tag, similar to something like is_admin, is_product, etc. for checking whether the filter is being called from the plugin?
Btw it’s an awesome plugin!
- The topic ‘Filtering out specific meta keys for order line items?’ is closed to new replies.