Woocommerce to add custom shipping

You can add custom shipping or fees on your woocommerce cart using below code.
make your additional charge add in eCommerce cart page add in total value based on cart or based on per product.
just add below code in your function.php file and see magic in cart page.