After WooCommerce-Update fucntion not working anymore

Finally did it. With the update of WooCommerce, which I assumed, the syntax of the set price did change. Function now looks like this:

add_action( 'woocommerce_before_calculate_totals', 'calc_ferienspiele_discount' );
function calc_ferienspiele_discount( $cart_object ) {
global $woocommerce;
$items = $woocommerce->cart->get_cart();
$x=0;
$custom_price = 140; // This will be your custome price
foreach ( $cart_object->cart_contents as $key => $value ) {
    $target_product_id=$value['data']->get_sku();
    for ($_i = 1; $_i <= $value['quantity']; $_i++) {
        $x++;
        if ( $target_product_id=='01010101' ) {
            if ($x>1) {
                $value['data']->set_price($custom_price);
                echo 'This works and get displayed';
            }
        }
    }
}
}