Get payer from order instead of customer

This commit is contained in:
dinamiko 2022-08-12 10:38:42 +02:00
parent 0e24b1d0f8
commit 76a81b535b
4 changed files with 5 additions and 9 deletions

View file

@ -361,12 +361,9 @@ class CreditCardGateway extends \WC_Payment_Gateway_CC {
$saved_credit_card = filter_input( INPUT_POST, 'saved_credit_card', FILTER_SANITIZE_STRING );
if($saved_credit_card) {
try {
$customer = new WC_Customer( $wc_order->get_customer_id() );
$wc_order = $this->vaulted_credit_card_handler->handle_payment(
$saved_credit_card,
$wc_order,
$customer
$wc_order
);
return $this->handle_payment_success( $wc_order );