Create refunds
-
Hello all,
I am trying to refund an order programmatically and for that I am trying to create a script that uses WP-CLI.
I have placed an example of my script here: https://gist.github.com/Yo…/cc5c02aa624090c453adbdf05aa7e6c5
I have two questions about this:
1. I can’t seem to get tax refunded
2. How do I also refund shipping (including tax)The script does refund the product price, but not the tax. Even though I’ve added ‘refund_tax’ to the line items, the tax is not refunded.
The documentation for wc_create_refund() is unfortunately very limited, so I’m hoping anyone here has done this before and might be able to tell me what I am doing wrong or where I can find the proper documentation.
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Create refunds’ is closed to new replies.