Last active
November 2, 2023 12:41
-
-
Save LaxusCroco/7c605a52b408b195345552704786b0fa to your computer and use it in GitHub Desktop.
Remove paylater and monthly options in the PayPal payment gateway
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( | |
'jet-form-builder/gateways/before-create', | |
function ( $rest_action ) { | |
if ( ! is_a( | |
$rest_action, | |
\JFB_Modules\Gateways\Paypal\Api_Actions\Pay_Now_Action::class | |
) ) { | |
return; | |
} | |
$rest_action->set_app_context( | |
array( | |
'disable_funding' => 'paylater', | |
) | |
); | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment