add_filter('woocommerce_package_rates', 'adjust_shipping_costs_by_weight', 10, 2); function adjust_shipping_costs_by_weight($rates, $package) { $total_weight = WC()->cart->get_cart_contents_weight(); if ($total_weight > 10) { foreach ($rates as $rate_id => $rate) { $rates[$rate_id]->cost += 7.00; // Zusätzliche Versandkosten für schwere Pakete } } return $rates; }