Revert webhook handling for now so psalm does not complain

This commit is contained in:
Emili Castells Guasch 2024-07-22 14:42:03 +02:00
parent 2249ebd811
commit 93506fe5b7
2 changed files with 9 additions and 9 deletions

View file

@ -164,6 +164,15 @@ class GooglePayGateway extends WC_Payment_Gateway {
);
}
/**
* If the WC_Order is paid through the approved webhook.
*/
//phpcs:disable WordPress.Security.NonceVerification.Recommended
if ( isset( $_REQUEST['ppcp-resume-order'] ) && $wc_order->has_status( 'processing' ) ) {
return $this->handle_payment_success( $wc_order );
}
//phpcs:enable WordPress.Security.NonceVerification.Recommended
do_action( 'woocommerce_paypal_payments_before_process_order', $wc_order );
try {

View file

@ -162,15 +162,6 @@ class WebhookModule implements ModuleInterface {
);
}
);
// If the WC_Order is paid through the approved webhook.
add_action( 'woocommerce_paypal_payments_before_process_order', function(WC_Order $wc_order) {
//phpcs:disable WordPress.Security.NonceVerification.Recommended
if ( isset( $_REQUEST['ppcp-resume-order'] ) && $wc_order->has_status( 'processing' ) ) {
return $this->handle_payment_success( $wc_order );
}
//phpcs:enable
});
}
/**