Update Woocommerce Product Prices on Cart/Checkout Pages

It’s been always seen that Woocommerce has only an option to tag the product price but if you want to update product price on cart/checkout pages, our provided snippets are going to help you to do this easily.

Note: WooCommerce Plugin must be configured in order to use these snippets.

Let’s check how it is working…

Snippet 1: Update product price on cart/checkout pages

This snippet can be used to update product price on cart/checkout page, it doesn’t matter whatever the price is set. See line#6 to replace the value.

Copy to Clipboard

Snippet 2: Update variable product price on cart/checkout pages

The snippet will help to update variable product price on cart/checkout page. You just need to replace the price value in line#7.

Copy to Clipboard

Snippet 3: Update Specific product price on cart/checkout pages

The snippet will help to update specific product price on cart/checkout page. Replace the price value in line#7.

Copy to Clipboard

Conclusion

So, All you need to add this code snippet to your theme functions.php file to update its product price on cart/checkout page on woocommerce sites.

Enjoy!

Farooq Abdullah

Web Developer

Farooq Abdullah is a professional Web Developer having more than 6 years of working experience in different PHP platforms especially WordPress. He is bachelors in computer science and he has also developed many plugins, add-ons and code snippets to facilitate others.

Sign up to our Newsletter

(We do not share your data with anybody, and only use it for its intended purpose)