Do not add payment instructions meta into non pui orders

This commit is contained in:
dinamiko 2022-10-07 11:27:55 +02:00
parent 783377cddd
commit 86b5f00fed

View file

@ -228,6 +228,10 @@ class PayUponInvoice {
'ppcp_payment_capture_completed_webhook_handler',
function ( WC_Order $wc_order, string $order_id ) {
try {
if ( $wc_order->get_payment_method() !== PayUponInvoiceGateway::ID ) {
return;
}
$order = $this->pui_order_endpoint->order( $order_id );
$payment_instructions = array(