How do I assign a math calculation to the WooCommerce Product Price Output?

I am working on a WordPress website, with WooCommerce functionality.

I have created a Custom Field on the Product Page, which allows shoppers to enter a piece of Text. I have also created an Output which then displays how many letters a shopper has entered into the Custom Field.

What is the correct code, which would then perform the following equation:

Product Price + (Custom Field Character Count Output + £2)

I would then need the sum of the above equation to override/manipulate the existing WooCommerce Pricing Output.

Ideally, I would want the Product Price to change in real time as to reflect the above equation.

Any ideas on how I can go about achieving this?

Read more here: How do I assign a math calculation to the WooCommerce Product Price Output?

Leave a Reply

Your email address will not be published. Required fields are marked *