Is it possible to update the total price on the checkout page in woocommerce from a custom field


I would like to know how I go about this. Let’s say I have some items in my checkout page in woocommerce. I want to apply a gift card to the order, I can’t use a gift card plugin because it is implemented already by a third party gift card service. Someone is building the connection for me to hit to connect to the third pary gift card service.

Now what I would like to do is on the checkout page, have a custom field where I can enter a gift card. with a submit button, that through I assume ajax run a php function that submits to the thrid party gift card service, with the amount of the total price and will return to me the amount it can cover.

Basically I want to know what would I hook into in woocomerce after this function is run to update the price in the checkout (cart), and I guess where would I hookinto to also add this custom field (or I guess custom form)

Hopefully this makes sense.

Anders Kitson 2 years 2020-10-21T13:10:37-05:00 0 Answers 7 views 0

Leave an answer