Merge pull request #892 from woocommerce/PCP-913-ratepay-payment-instructions-added-to-non-pay-upon-invoice-orders

Ratepay payment instructions added to non Pay upon Invoice orders
This commit is contained in:
Emili Castells 2022-10-14 09:09:59 +02:00 committed by GitHub
commit aec2bde851
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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(