WooCommerce change price in cart [closed]

So the answer to this is instead of placing the code in your functions.php, you create a “woocommerce” folder in your theme folder, and place the “cart” folder and the “cart.php” template file from the woocommerce plugin inside of that. Then you place the same code as in the “woocommerce_before_calculate_totals” action inside the loop of the cart template. So the code below is what I placed in the cart.php file and it now works!

$qty = $cart_item['quantity'];

$discount1 = get_post_meta($cart_item['product_id'], '_discount_1_4_items', true);
$discount2 = get_post_meta($cart_item['product_id'], '_discount_5_9_items', true);
$discount3 = get_post_meta($cart_item['product_id'], '_discount_10_19_items', true);
$discount4 = get_post_meta($cart_item['product_id'], '_discount_20_items', true);

$OriginalPrice = $cart_item['data']->get_price();

if($qty >= 1 && $qty <=4){
    $FinalPrice = $OriginalPrice*$discount1;
}elseif($qty >= 5 && $qty <=9){
    $FinalPrice = $OriginalPrice*$discount2;
}elseif($qty >= 10 && $qty <=19){
    $FinalPrice = $OriginalPrice*$discount3;
}elseif($qty >= 20 ){
    $FinalPrice = $OriginalPrice*$discount4;
}
$cart_item['data']->set_price( $FinalPrice );