Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call to a member function get_token() #24

Open
leandrosantoss opened this issue Oct 5, 2022 · 0 comments
Open

Call to a member function get_token() #24

leandrosantoss opened this issue Oct 5, 2022 · 0 comments

Comments

@leandrosantoss
Copy link

Boa noite!

Tenho me deparado com constantes erros e ao explorar vi esse log na aplicação:

PHP Fatal error: Uncaught Error: Call to a member function get_token() on null in /var/www/meusite.com.br/wp-content/plugins/iugu-woocommerce/inc/class-wc-iugu-api.php:1198\nStack trace:\n#0 /var/www/meusite.com.br/wp-content/plugins/iugu-woocommerce/inc/class-wc-iugu-api.php(1253): WC_Iugu_API->get_charge_data()\n#1 /var/www/meusite.com.br/wp-content/plugins/iugu-woocommerce/inc/class-wc-iugu-api.php(1936): WC_Iugu_API->create_charge()\n#2 /var/www/meusite.com.br/wp-content/plugins/iugu-woocommerce/inc/gateways/credit-card/class-wc-iugu-credit-card-gateway.php(396): WC_Iugu_API->process_payment()\n#3 /var/www/meusite.com.br/wp-content/plugins/woocommerce/includes/class-wc-checkout.php(982): WC_Iugu_Credit_Card_Gateway->process_payment()\n#4 /var/www/meusite.com.br/wp-content/plugins/woocommerce/includes/class-wc-checkout.php(1206): WC_Checkout->process_order_payment()\n#5 /var/www/meusite.com.br/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(461): WC_Checkout->process_checkout()\n#6 /var/www/ma in /var/www/meusite.com.br/wp-content/plugins/iugu-woocommerce/inc/class-wc-iugu-api.php on line 1198, referer: https://loja.meusite.com.br/finalizar-compra/

Trecho do código:

`

    $customer_payment_method_id = WC_Payment_Tokens::get($posted['customer_payment_method_id']);

    $data['customer_payment_method_id'] = $customer_payment_method_id->get_token();

`

---> $customer_payment_method_id->get_token();

Obrigado

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant