Advertisement
wclovers

Untitled

Mar 16th, 2023 (edited)
533
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.42 KB | None | 0 0
  1. add_filter( 'woocommerce_order_item_get_formatted_meta_data', function( $formatted_meta ) {
  2.     if( !empty( $formatted_meta ) ) {
  3.         foreach( $formatted_meta as $meta_id => $meta ) {
  4.             if( isset( $meta->key ) && in_array( $meta->key, array( 'wcfm_tracking_code', 'wcfm_tracking_url' ) ) ) {
  5.                 unset( $formatted_meta[$meta_id] );
  6.             }
  7.         }
  8.     }
  9.     return $formatted_meta;
  10. }, 51 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement