Skip to content

Instantly share code, notes, and snippets.

@rajeshsingh520
Created November 9, 2025 01:26
Show Gist options
  • Select an option

  • Save rajeshsingh520/c1e6b8c388c265d84ab7e2bd8eb1c8e2 to your computer and use it in GitHub Desktop.

Select an option

Save rajeshsingh520/c1e6b8c388c265d84ab7e2bd8eb1c8e2 to your computer and use it in GitHub Desktop.
add_filter('woocommerce_order_item_get_method_title', function($title, $item){
$method_id = $item->get_method_id();
$instance_id = $item->get_instance_id();
if($method_id === 'pisol_extended_flat_shipping'){
$title = get_the_title($instance_id);
}
return $title;
}, PHP_INT_MAX, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment