Fix wrong card payment source sent to create wc card payment

This commit is contained in:
Emili Castells Guasch 2024-03-21 15:48:15 +01:00
parent 082550b363
commit 5d92a6e791
2 changed files with 12 additions and 2 deletions

View file

@ -346,7 +346,12 @@ class RenewalHandler {
if ( $customer_token['payment_source']->name() === 'card' ) {
$this->wc_payment_tokens->create_payment_token_card(
get_current_user_id(),
$customer_token['id']
(object) array(
'id' => $customer_token['id'],
'payment_source' => (object) array(
$customer_token['payment_source']->name() => $customer_token['payment_source']->properties(),
),
)
);
}
}