mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
Rename method
This commit is contained in:
parent
457e9f0182
commit
efc20c390d
2 changed files with 2 additions and 2 deletions
|
@ -115,7 +115,7 @@ class PaymentMethodTokensEndpoint {
|
||||||
* @throws RuntimeException When something when wrong with the request.
|
* @throws RuntimeException When something when wrong with the request.
|
||||||
* @throws PayPalApiException When something when wrong setting up the token.
|
* @throws PayPalApiException When something when wrong setting up the token.
|
||||||
*/
|
*/
|
||||||
public function payment_tokens( PaymentSource $payment_source ): stdClass {
|
public function create_payment_token(PaymentSource $payment_source ): stdClass {
|
||||||
$data = array(
|
$data = array(
|
||||||
'payment_source' => array(
|
'payment_source' => array(
|
||||||
$payment_source->name() => $payment_source->properties(),
|
$payment_source->name() => $payment_source->properties(),
|
||||||
|
|
|
@ -94,7 +94,7 @@ class CreatePaymentToken implements EndpointInterface {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$result = $this->payment_method_tokens_endpoint->payment_tokens( $payment_source );
|
$result = $this->payment_method_tokens_endpoint->create_payment_token( $payment_source );
|
||||||
|
|
||||||
if ( is_user_logged_in() && isset( $result->customer->id ) ) {
|
if ( is_user_logged_in() && isset( $result->customer->id ) ) {
|
||||||
$current_user_id = get_current_user_id();
|
$current_user_id = get_current_user_id();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue