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 finalize_payment() on null in background queue #11

Open
olitooni opened this issue Jun 4, 2024 · 0 comments

Comments

@olitooni
Copy link

olitooni commented Jun 4, 2024

Hello!

We get critical errors from the background pay queue feature in the latest version of this plugin (3.6.0). We are using WP-CLI to trigger WP CRON jobs using crontab. Running wp cron event run wp_1_swedbank_pay_queue_cron gives us an critical.

This is the full stack trace:

[2024-06-04 08:35:03 +0200] PHP-ERROR: WARNING Undefined property: WooCommerce\PayPalCommerce\WcGateway\Gateway\PayPalGateway::$api in /var/www/tt-wp/web/app/plugins/swedbank-pay-payment-menu/includes/class-swedbank-pay-background-queue.php:212

[2024-06-04 08:35:03 +0200] PHP-ERROR: CRITICAL Call to a member function finalize_payment() on null in /var/www/tt-wp/web/app/plugins/swedbank-pay-payment-menu/includes/class-swedbank-pay-background-queue.php:212

[2024-06-04 08:35:03 +0200] PHP-ERROR: CRITICAL Uncaught Error: Call to a member function finalize_payment() on null in /var/www/tt-wp/web/app/plugins/swedbank-pay-payment-menu/includes/class-swedbank-pay-background-queue.php:212 Stack trace: #0 /var/www/tt-wp/web/app/plugins/woocommerce/includes/abstracts/class-wc-background-process.php(102): SwedbankPay\Checkout\WooCommerce\Swedbank_Pay_Background_Queue->task() #1 /var/www/tt-wp/web/app/plugins/woocommerce/includes/libraries/wp-background-process.php(447): WC_Background_Process->handle() #2 /var/www/tt-wp/web/wp/wp-includes/class-wp-hook.php(324): WP_Background_Process->handle_cron_healthcheck() #3 /var/www/tt-wp/web/wp/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #4 /var/www/tt-wp/web/wp/wp-includes/plugin.php(565): WP_Hook->do_action() #5 /var/www/tt-wp/vendor/wp-cli/cron-command/src/Cron_Event_Command.php(358): do_action_ref_array() #6 /var/www/tt-wp/vendor/wp-cli/cron-command/src/Cron_Event_Command.php(238): Cron_Event_Command::run_event() #7 [internal function]: Cron_Event_Command->run() #8 /var/www/tt-wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php(100): call_user_func() #9 [internal function]: WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}() #10 /var/www/tt-wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/Subcommand.php(497): call_user_func() #11 /var/www/tt-wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(441): WP_CLI\Dispatcher\Subcommand->invoke() #12 /var/www/tt-wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(464): WP_CLI\Runner->run_command() #13 /var/www/tt-wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1296): WP_CLI\Runner->run_command_and_exit() #14 /var/www/tt-wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(28): WP_CLI\Runner->start() #15 /var/www/tt-wp/vendor/wp-cli/wp-cli/php/bootstrap.php(83): WP_CLI\Bootstrap\LaunchRunner->process() #16 /var/www/tt-wp/vendor/wp-cli/wp-cli/php/wp-cli.php(32): WP_CLI\bootstrap() #17 /var/www/tt-wp/vendor/wp-cli/wp-cli/php/boot-fs.php(17): require_once('...') #18 {main}   thrown in /var/www/tt-wp/web/app/plugins/swedbank-pay-payment-menu/includes/class-swedbank-pay-background-queue.php:212
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