mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Show "Venmo" instead of "PayPal" when using its' button
This commit is contained in:
parent
cf5d1ec21f
commit
f4a32a01e7
8 changed files with 155 additions and 161 deletions
|
@ -40,6 +40,13 @@ class SessionHandler {
|
|||
*/
|
||||
private $insufficient_funding_tries = 0;
|
||||
|
||||
/**
|
||||
* The funding source of the current checkout (venmo, ...) or null.
|
||||
*
|
||||
* @var string|null
|
||||
*/
|
||||
private $funding_source = null;
|
||||
|
||||
/**
|
||||
* Returns the order.
|
||||
*
|
||||
|
@ -84,6 +91,28 @@ class SessionHandler {
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the funding source of the current checkout (venmo, ...) or null.
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function funding_source(): ?string {
|
||||
return $this->funding_source;
|
||||
}
|
||||
|
||||
/**
|
||||
* Replaces the funding source of the current checkout.
|
||||
*
|
||||
* @param string|null $funding_source The funding source.
|
||||
*
|
||||
* @return SessionHandler
|
||||
*/
|
||||
public function replace_funding_source( ?string $funding_source ): SessionHandler {
|
||||
$this->funding_source = $funding_source;
|
||||
$this->store_session();
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns how many times the customer tried to use the PayPal Gateway in this session.
|
||||
*
|
||||
|
@ -113,6 +142,7 @@ class SessionHandler {
|
|||
$this->order = null;
|
||||
$this->bn_code = '';
|
||||
$this->insufficient_funding_tries = 0;
|
||||
$this->funding_source = null;
|
||||
$this->store_session();
|
||||
return $this;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue