I changed the total price by using this WC()->cart->set_total(123456), but when i pay using a credit card, the amount paid is the normal amount, it should be 12345 but looks like WC()->cart->set_total(12345) only works to change the total price inside the shopping cart.
Any thoughts? Thanks
2
Answers
This is fairly vague and not sure why you are trying to set the carts total vs an items total. But something like this I believe is what you are looking for.
Change Cart total using Hooks in Woocommerce 3.2+
Try this: