Quantcast
Channel: Programmatically setting Woocommerce product price - WordPress Development Stack Exchange
Viewing all articles
Browse latest Browse all 2

Programmatically setting Woocommerce product price

$
0
0

I have a product (course) that loses value the closer it gets to the end of term.I've set up 'End date' and 'Weekly price' as custom fields on a page, and can calculate the exact price to pay in PHP.

How do I dynamically create a woocommerce product, or change an established product's price based on the 'Time Left' calculation I performed?

I've tried changing 'price.php' in Woocommerce's template file, but apparently it's just a cosmetic change, and the price reverts to original at basket and checkout.

Haven't the foggiest where else to start, so many thanks in advance.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles



Latest Images