So if a customer cancels their order (or we cancel it) after authorizing payment, but before payment is captured, we have to do a refund to cancel the PayPal authorization?
Thank you very much. For now I will create a custom field for orders and use that instead of the built-in refund reason. When I have more time I will look into the html-order-items.php file and see how to tap into that without hacking the core file.
Thank you but that does not help as we are not using the PayPal Checkout Gateway. We are using the PayPal standard payment method because the checkout gateway and the new PayPal payments do not work for us.
I know I could add additional clauses to protected function save_paypal_meta_data( $order, $posted ) but obviously, that would be an absolute last resort as I would have to redo it with every update.