DescriptionUsageParametersExamplePlacementSource Code
Description
This filter can be used to disable funding sources when using the PayPal Checkout method on the PayPal Field with the PayPal Checkout Add-On.
Usage
The following would apply to all forms:
add_filter( 'gform_ppcp_disable_funding', 'your_function_name' );
Parameters
$disabled_funding array
An array of disabled founding sources. Defaults to an empty array.
The possible values are: card, credit, venmo, sepa, bancontact, eps, giropay, ideal, mybank, p24, sofort.
See the PayPal Checkout developer documentation for the latest updates.
Example
This example shows how you can disable SEPA-Lastschrift as a funding source.
add_filter( 'gform_ppcp_disable_funding', 'ppcp_disable_sepa' );
function ppcp_disable_sepa( $disabled_funding ) {
$disabled_funding[] = 'sepa';
return $disabled_funding;
}
Placement
This code should be placed in the functions.php file of your active theme.
Source Code
return implode( ',', apply_filters( 'gform_ppcp_disable_funding', $disabled_funding ) )
This filter is located in GF_PPCP::get_disable_funding() in class-gf-ppcp.php.