From 2092a4cd966affec3601bf28b1f964ad8d3a04c7 Mon Sep 17 00:00:00 2001 From: vendidero Date: Mon, 2 Dec 2024 10:42:41 +0100 Subject: [PATCH] Allow filtering packaging title. --- src/Packaging.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Packaging.php b/src/Packaging.php index d0c431a..f877a3c 100644 --- a/src/Packaging.php +++ b/src/Packaging.php @@ -518,13 +518,14 @@ public function set_dimension_unit( $unit ) { public function get_title() { $description = $this->get_description(); - - return sprintf( + $title = sprintf( _x( '%1$s (%2$s, %3$s)', 'shipments-packaging-title', 'woocommerce-germanized-shipments' ), $description, $this->get_formatted_dimensions(), wc_gzd_format_shipment_weight( wc_format_decimal( $this->get_weight(), false, true ), wc_gzd_get_packaging_weight_unit() ) ); + + return apply_filters( "{$this->get_hook_prefix()}title", $title, $this ); } /**