Disable gateways only for non PayPal funding sources

This commit is contained in:
dinamiko 2022-08-04 11:25:12 +02:00
parent f256134148
commit f11f151e65

View file

@ -107,7 +107,7 @@ class DisableGateways {
*/
private function needs_to_disable_gateways(): bool {
$wc_ajax = filter_input( INPUT_GET, 'wc-ajax', FILTER_SANITIZE_STRING ) ?? '';
if ( $wc_ajax === 'update_order_review' ) {
if ( $wc_ajax === 'update_order_review' && $this->session_handler->funding_source() !== 'paypal' ) {
return false;
}