mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Adjustments funding source naming
This commit is contained in:
parent
09937fc991
commit
fdca5c56a5
3 changed files with 13 additions and 3 deletions
|
@ -1318,7 +1318,7 @@ document.querySelector("#payment").before(document.querySelector("#ppcp-messages
|
||||||
$disable_funding,
|
$disable_funding,
|
||||||
array_diff(
|
array_diff(
|
||||||
array_keys( $this->all_funding_sources ),
|
array_keys( $this->all_funding_sources ),
|
||||||
array( 'venmo', 'paylater' )
|
array( 'venmo', 'paylater', 'paypal' )
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1339,6 +1339,14 @@ document.querySelector("#payment").before(document.querySelector("#ppcp-messages
|
||||||
$disable_funding[] = 'paylater';
|
$disable_funding[] = 'paylater';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Make sure paypal is not sent in disable funding.
|
||||||
|
$disable_funding = array_filter(
|
||||||
|
$disable_funding,
|
||||||
|
function( $value ) {
|
||||||
|
return $value !== 'paypal';
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
if ( count( $disable_funding ) > 0 ) {
|
if ( count( $disable_funding ) > 0 ) {
|
||||||
$params['disable-funding'] = implode( ',', array_unique( $disable_funding ) );
|
$params['disable-funding'] = implode( ',', array_unique( $disable_funding ) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -962,7 +962,8 @@ return array(
|
||||||
'sofort' => _x( 'Sofort', 'Name of payment method', 'woocommerce-paypal-payments' ),
|
'sofort' => _x( 'Sofort', 'Name of payment method', 'woocommerce-paypal-payments' ),
|
||||||
'venmo' => _x( 'Venmo', 'Name of payment method', 'woocommerce-paypal-payments' ),
|
'venmo' => _x( 'Venmo', 'Name of payment method', 'woocommerce-paypal-payments' ),
|
||||||
'trustly' => _x( 'Trustly', 'Name of payment method', 'woocommerce-paypal-payments' ),
|
'trustly' => _x( 'Trustly', 'Name of payment method', 'woocommerce-paypal-payments' ),
|
||||||
'paylater' => _x( 'Pay Later', 'Name of payment method', 'woocommerce-paypal-payments' ),
|
'paylater' => _x( 'PayPal Pay Later', 'Name of payment method', 'woocommerce-paypal-payments' ),
|
||||||
|
'paypal' => _x( 'PayPal', 'Name of payment method', 'woocommerce-paypal-payments' ),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -985,6 +986,7 @@ return array(
|
||||||
array_flip(
|
array_flip(
|
||||||
array(
|
array(
|
||||||
'paylater',
|
'paylater',
|
||||||
|
'paypal',
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
|
@ -34,7 +34,7 @@ class FundingSourceRenderer {
|
||||||
*
|
*
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
protected $own_funding_sources = array( 'venmo', 'paylater' );
|
protected $own_funding_sources = array( 'venmo', 'paylater', 'paypal' );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* FundingSourceRenderer constructor.
|
* FundingSourceRenderer constructor.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue