Have you tried get_post_meta()? I believe the PayPal transaction ID is stored as meta data on the order/post record.
Thanks for replying here. I didn’t get the notification of your reply and apologize that I did not follow up.
Our integration is locked into the WooCommerce API, which I don’t think allows access to post meta. In that API, transaction_id shows up both as an object under Order and under payment_details.
We are looking to see if we can pull the ID out of the order notes with some REGEX, but using the actual field would be ideal. Any idea why the transaction_id is not where it’s supposed to be?
I’m not really sure what you mean by “not where it’s supposed to be”..?? It’s common practice to store such data in post meta fields. If you’re in the WordPress platform you shouldn’t have any issues using those, and if your platform is somehow locking you out of that I would recommend a different platform. Not having access to that sort of defeats the purpose of using WordPress as a foundation.