Rename method

This commit is contained in:
Emili Castells Guasch 2024-04-08 13:38:18 +02:00
parent 457e9f0182
commit efc20c390d
2 changed files with 2 additions and 2 deletions

View file

@ -115,7 +115,7 @@ class PaymentMethodTokensEndpoint {
* @throws RuntimeException When something when wrong with the request.
* @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(
'payment_source' => array(
$payment_source->name() => $payment_source->properties(),

View file

@ -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 ) ) {
$current_user_id = get_current_user_id();