How to programmatically apply a one-time cart discount to the current session
-
I have a php code that renders a booking form using the shortcode “(getpaid item=<itemID>|<qty>)”, where the item ID and quantity are determined programmatically. I want to be able to apply a discount to the cart as it’s rendered. One option would be to create a randomly generated discount code for the amount, publish it, then use JavaScript to populate the discount code field. But I’d like to avoid doing that, and simply adjust the final price for this current session alone without creating a discount code. How can I do this?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to programmatically apply a one-time cart discount to the current session’ is closed to new replies.