The solution was to add remove_action( 'woocommerce_before_calculate_totals', 'odb_add_length_price', 10, 1);
on the first line in the function.
This removes the function each time it run and works like expected.
The solution was to add remove_action( 'woocommerce_before_calculate_totals', 'odb_add_length_price', 10, 1);
on the first line in the function.
This removes the function each time it run and works like expected.