diff --git a/composer.lock b/composer.lock index db43fed6..8a15609d 100644 --- a/composer.lock +++ b/composer.lock @@ -875,12 +875,12 @@ "source": { "type": "git", "url": "https://github.com/vendidero/woocommerce-germanized-shipments.git", - "reference": "28db4b8ccadd49cf4946fef91b99e1e273b3ee5a" + "reference": "fc2d789e51441a53964375d4f108f8ae5a856605" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vendidero/woocommerce-germanized-shipments/zipball/28db4b8ccadd49cf4946fef91b99e1e273b3ee5a", - "reference": "28db4b8ccadd49cf4946fef91b99e1e273b3ee5a", + "url": "https://api.github.com/repos/vendidero/woocommerce-germanized-shipments/zipball/fc2d789e51441a53964375d4f108f8ae5a856605", + "reference": "fc2d789e51441a53964375d4f108f8ae5a856605", "shasum": "" }, "require": { @@ -926,7 +926,7 @@ "source": "https://github.com/vendidero/woocommerce-germanized-shipments/tree/v4.0.0", "issues": "https://github.com/vendidero/woocommerce-germanized-shipments/issues" }, - "time": "2024-09-25T11:13:32+00:00" + "time": "2024-09-25T14:20:22+00:00" } ], "packages-dev": [ diff --git a/src/Bootstrap.php b/src/Bootstrap.php index 56f3942b..77fab88d 100644 --- a/src/Bootstrap.php +++ b/src/Bootstrap.php @@ -62,9 +62,19 @@ function () { } private function setup_shipments_integration() { - /** - * Tell the shipment integration whether prices include taxes or not. - */ + add_filter( + 'woocommerce_gzd_shipments_is_provider_integration_active', + function ( $is_active, $provider_name ) { + if ( in_array( $provider_name, array( 'dhl', 'deutsche_post' ), true ) ) { + $is_active = true; + } + + return $is_active; + }, + 10, + 2 + ); + add_filter( 'woocommerce_gzd_shipments_additional_costs_include_tax', function () {