mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Merge pull request #2118 from woocommerce/PCP-1944-improve-funding-source-names
Improve funding source names (1944)
This commit is contained in:
commit
1b98ba2795
3 changed files with 19 additions and 3 deletions
|
@ -1318,7 +1318,7 @@ document.querySelector("#payment").before(document.querySelector("#ppcp-messages
|
|||
$disable_funding,
|
||||
array_diff(
|
||||
array_keys( $this->all_funding_sources ),
|
||||
array( 'venmo', 'paylater' )
|
||||
array( 'venmo', 'paylater', 'paypal' )
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@ -1339,6 +1339,20 @@ document.querySelector("#payment").before(document.querySelector("#ppcp-messages
|
|||
$disable_funding[] = 'paylater';
|
||||
}
|
||||
|
||||
$disable_funding = array_filter(
|
||||
$disable_funding,
|
||||
/**
|
||||
* Make sure paypal is not sent in disable funding.
|
||||
*
|
||||
* @param string $funding_source The funding_source.
|
||||
*
|
||||
* @psalm-suppress MissingClosureParamType
|
||||
*/
|
||||
function( $funding_source ) {
|
||||
return $funding_source !== 'paypal';
|
||||
}
|
||||
);
|
||||
|
||||
if ( count( $disable_funding ) > 0 ) {
|
||||
$params['disable-funding'] = implode( ',', array_unique( $disable_funding ) );
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue