Попробуйте следующее:
add_action( 'woocommerce_cart_calculate_fees', 'tiered_fee_based_on_cart_total', 10, 1 );
function tiered_fee_based_on_cart_total( $cart ) {
if ( is_admin() && ! defined( 'DOING_AJAX' ) )
return;
$total = $cart->cart_contents_total; // The cart total
if( $total < 50 )
$fee = 8;
elseif( $total >= 50 && $total < 100 )
$fee = 10;
else
$fee = 12;
if ( $fee != 0 )
$cart->add_fee( __( "Kosten MandaBai", "woocommerce" ), -$fee, false );
}
Код помещается в файл functions.php вашей активной дочерней темы (или активной темы).Проверено и работает.