Open ifnull opened 2 years ago
will provide what I need but since it is a private function, I'm unable to call it.
I think it would not help much even if it was public
? You still need an order object retrieved from PayPal API.
If you want to do that, you can get api.endpoint.order
from the container like discussed here and call its order
method.
Description
We are migrating from
woocommerce-gateway-paypal-express-checkout
. At checkout, we authorize then capture after an order has been fulfilled. Before sending an order to the fulfillment system we check the status of the authorization of a transaction. The way we do this in the Paypal Express Checkout plugin is by checking the order meta key_paypal_status
and getting the transaction details using the plugin's internal gateway client. If the transaction is pending for any reason other than "authorization" we cancel the order.Excerpt of how we do this today:
With the
woocommerce-paypal-payments
plugin, I do not see a_paypal_status
meta key on the order. However, it looks like the function order_is_approved() will provide what I need but since it is a private function, I'm unable to call it.To Reproduce
Expected Behavior
Order approval status is returned.
Actual Behavior
Environment