Set a specific product price conditionally on Woocommerce single product page & cart

Set a specific product price conditionally on Woocommerce single product page & cart
89 Views

Update 3 (Only for a defined product ID)

To make it work as you want to change the simple products prices only on single product pages (without altering archives product prices, related product prices, upsells and cross-sells) if any cart item doesn’t belong to a specific product category.

Then you will need all this following code:

Code goes in function.php file of your active child theme (or active theme).

Was this article helpful?
YesNo

Leave a comment

Your email address will not be published.