0

I'm hoping to access the $note variable that is passed in update_status() during checkout in the PayPal gateway. Unfortunately, the order note appears to be added after the transition email is already sent so I can't include it in the email.

Is it possible to include the $note from update_status() in the transition email without modifying the core files of the gateway?

MarkPraschan
  • 560
  • 6
  • 8
  • 1
    The order note is added by the `WC_Gateway_Paypal_Response class` in [`payment_complete()` methods using the `add_ord_note()` `WC_Order` method](https://docs.woocommerce.com/wp-content/images/wc-apidocs/source-class-WC_Gateway_Paypal.html#18-375) as you will see… So you not we be able to intercept it … You may try to use `woocommerce_payment_complete` action hook, to get the last generated order note, but I don't see how you could include it in an email… – LoicTheAztec Jul 19 '18 at 21:07
  • 1
    Thanks for the info anyway. No kidding, I was actually thinking "I hope Loic sees this" since your snippets and explanations help me like every day. Cheers. – MarkPraschan Jul 20 '18 at 17:56

0 Answers0