In this tutorial I will show you how we can override prices of the products that are already in the Cart with the help of
woocommerce_before_calculate_totals action hook and cart object.
Here we are going to deal with products that have already been added to cart, if you would like to add products to the cart with a custom price, I can recommend you this example.
Below we are going to set the same price ($10) for every product in the cart programmatically.
WooCommerce has a built-in password strength meter, which you can find for example in My Account – Account details. And as everything else in WooCommerce, it has a pretty neat customization with hooks.
Here is how it looks and works by default: