patrickkivits / bunq-for-woocommerce

Accept payments in your WooCommerce shop with just your bunq account
19 stars 3 forks source link

Unfortunately does not work with the latest WooCommerce update (blank wp-admin) #15

Closed toineenzo closed 1 year ago

toineenzo commented 1 year ago

Hi,

Since WooCommerce 7.9.0, I get a blank screen accessing the WP-Admin. This does not happen when this plugin is disabled. See the error log down below

WordPress version 6.2.2
Active theme: Hello Elementor (version 2.8.1)
Current plugin: bunq for WooCommerce (version 1.2.6)
PHP version 8.0.27

Error Details
An error of type E_ERROR was caused in line 171 of the file /site.com/public_html/wp-content/plugins/bunq-for-woocommerce-1.2.6/vendor/bunq/sdk_php/src/Http/Handler/ResponseHandlerSignature.php. Error message: Uncaught TypeError: vsprintf(): Argument #2 ($values) must be of type array, string given in /site.com/public_html/wp-content/plugins/bunq-for-woocommerce-1.2.6/vendor/bunq/sdk_php/src/Http/Handler/ResponseHandlerSignature.php:171
Stack trace:
#0 /site.com/public_html/wp-content/plugins/bunq-for-woocommerce-1.2.6/vendor/bunq/sdk_php/src/Http/Handler/ResponseHandlerSignature.php(171): vsprintf()
#1 /site.com/public_html/wp-content/plugins/bunq-for-woocommerce-1.2.6/vendor/bunq/sdk_php/src/Http/Handler/ResponseHandlerSignature.php(146): bunq\Http\Handler\ResponseHandlerSignature->ensureHeaderIsCorrectlyCased()
#2 /site.com/public_html/wp-content/plugins/bunq-for-woocommerce-1.2.6/vendor/bunq/sdk_php/src/Http/Handler/ResponseHandlerSignature.php(100): bunq\Http\Handler\ResponseHandlerSignature->determineHeaderStringForSignedResponse()
#3 /site.com/public_html/wp-content/plugins/bunq-for-woocommerce-1.2.6/vendor/bunq/sdk_php/src/Http/Handler/ResponseHandlerSignature.php(74): bunq\Http\Handler\ResponseHandlerSignature->isResponseSignatureHeaderWithBodyValid()
#4 /site.com/public_html/wp-content/plugins/bunq-for-woocommerce-1.2.6/vendor/bunq/sdk_php/src/Http/Handler/HandlerUtil.php(42): bunq\Http\Handler\ResponseHandlerSignature->execute()
#5 /site.com/public_html/wp-content/plugins/bunq-for-woocommerce-1.2.6/vendor/guzzlehttp/promises/src/Promise.php(204): bunq\Http\Handler\HandlerUtil::bunq\Http\Handler\{closure}()
#6 /site.com/public_html/wp-content/plugins/bunq-for-woocommerce-1.2.6/vendor/guzzlehttp/promises/src/Promise.php(153): GuzzleHttp\Promise\Promise::callHandler()
#7 /site.com/public_html/wp-content/plugins/bunq-for-woocommerce-1.2.6/vendor/guzzlehttp/promises/src/TaskQueue.php(48): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}()
#8 /site.com/public_html/wp-content/plugins/bunq-for-woocommerce-1.2.6/vendor/guzzlehttp/promises/src/Promise.php(248): GuzzleHttp\Promise\TaskQueue->run()
#9 /site.com/public_html/wp-content/plugins/bunq-for-woocommerce-1.2.6/vendor/guzzlehttp/promises/src/Promise.php(224): GuzzleHttp\Promise\Promise->invokeWaitFn()
#10 /site.com/public_html/wp-content/plugins/bunq-for-woocommerce-1.2.6/vendor/guzzlehttp/promises/src/Promise.php(269): GuzzleHttp\Promise\Promise->waitIfPending()
#11 /site.com/public_html/wp-content/plugins/bunq-for-woocommerce-1.2.6/vendor/guzzlehttp/promises/src/Promise.php(226): GuzzleHttp\Promise\Promise->invokeWaitList()
#12 /site.com/public_html/wp-content/plugins/bunq-for-woocommerce-1.2.6/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending()
#13 /site.com/public_html/wp-content/plugins/bunq-for-woocommerce-1.2.6/vendor/guzzlehttp/guzzle/src/Client.php(187): GuzzleHttp\Promise\Promise->wait()
#14 /site.com/public_html/wp-content/plugins/bunq-for-woocommerce-1.2.6/vendor/bunq/sdk_php/src/Http/ApiClient.php(220): GuzzleHttp\Client->request()
#15 /site.com/public_html/wp-content/plugins/bunq-for-woocommerce-1.2.6/vendor/bunq/sdk_php/src/Http/ApiClient.php(485): bunq\Http\ApiClient->request()
#16 /site.com/public_html/wp-content/plugins/bunq-for-woocommerce-1.2.6/vendor/bunq/sdk_php/src/Model/Core/SessionServer.php(67): bunq\Http\ApiClient->post()
#17 /site.com/public_html/wp-content/plugins/bunq-for-woocommerce-1.2.6/vendor/bunq/sdk_php/src/Context/ApiContext.php(247): bunq\Model\Core\SessionServer::create()
#18 /site.com/public_html/wp-content/plugins/bunq-for-woocommerce-1.2.6/vendor/bunq/sdk_php/src/Context/ApiContext.php(392): bunq\Context\ApiContext->initializeSessionContext()
#19 /site.com/public_html/wp-content/plugins/bunq-for-woocommerce-1.2.6/vendor/bunq/sdk_php/src/Context/ApiContext.php(363): bunq\Context\ApiContext->resetSession()
#20 /site.com/public_html/wp-content/plugins/bunq-for-woocommerce-1.2.6/includes/bunq.php(35): bunq\Context\ApiContext->ensureSessionActive()
#21 /site.com/public_html/wp-content/plugins/bunq-for-woocommerce-1.2.6/bunq-for-woocommerce.php(403): bunq_load_api_context_from_json()
#22 /site.com/public_html/wp-content/plugins/bunq-for-woocommerce-1.2.6/bunq-for-woocommerce.php(213): WC_Bunq_Gateway->load_api_context()
#23 /site.com/public_html/wp-content/plugins/bunq-for-woocommerce-1.2.6/bunq-for-woocommerce.php(63): WC_Bunq_Gateway->init_form_fields()
#24 /site.com/public_html/wp-content/plugins/woocommerce/includes/class-wc-payment-gateways.php(97): WC_Bunq_Gateway->__construct()
#25 /site.com/public_html/wp-content/plugins/woocommerce/includes/class-wc-payment-gateways.php(70): WC_Payment_Gateways->init()
#26 /site.com/public_html/wp-content/plugins/woocommerce/includes/class-wc-payment-gateways.php(43): WC_Payment_Gateways->__construct()
#27 /site.com/public_html/wp-content/plugins/woocommerce/includes/class-woocommerce.php(961): WC_Payment_Gateways::instance()
#28 /site.com/public_html/wp-content/plugins/woocommerce/includes/class-woocommerce.php(175): WooCommerce->payment_gateways()
#29 /site.com/public_html/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/CheckoutSchema.php(124): WooCommerce->__get()
#30 /site.com/public_html/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/AbstractSchema.php(62): Automattic\WooCommerce\StoreApi\Schemas\V1\CheckoutSchema->get_properties()
#31 /site.com/public_html/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Routes/V1/AbstractRoute.php(85): Automattic\WooCommerce\StoreApi\Schemas\V1\AbstractSchema->get_item_schema()
#32 /site.com/public_html/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Routes/V1/AbstractRoute.php(265): Automattic\WooCommerce\StoreApi\Routes\V1\AbstractRoute->get_item_schema()
#33 /site.com/public_html/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Routes/V1/Checkout.php(71): Automattic\WooCommerce\StoreApi\Routes\V1\AbstractRoute->get_context_param()
#34 /site.com/public_html/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/RoutesController.php(114): Automattic\WooCommerce\StoreApi\Routes\V1\Checkout->get_args()
#35 /site.com/public_html/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/RoutesController.php(69): Automattic\WooCommerce\StoreApi\RoutesController->register_routes()
#36 /site.com/public_html/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/StoreApi.php(27): Automattic\WooCommerce\StoreApi\RoutesController->register_all_routes()
#37 /site.com/public_html/wp-includes/class-wp-hook.php(308): Automattic\WooCommerce\StoreApi\StoreApi->Automattic\WooCommerce\StoreApi\{closure}()
#38 /site.com/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
#39 /site.com/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
#40 /site.com/public_html/wp-includes/rest-api.php(577): do_action()
#41 /site.com/public_html/wp-includes/rest-api.php(535): rest_get_server()
#42 /site.com/public_html/wp-content/plugins/woocommerce/includes/admin/class-wc-admin-dashboard.php(479): rest_do_request()
#43 /site.com/public_html/wp-content/plugins/woocommerce/includes/admin/class-wc-admin-dashboard.php(138): WC_Admin_Dashboard->get_wc_admin_performance_data()
#44 /site.com/public_html/wp-admin/includes/template.php(1445): WC_Admin_Dashboard->status_widget()
#45 /site.com/public_html/wp-admin/includes/dashboard.php(271): do_meta_boxes()
#46 /site.com/public_html/wp-admin/index.php(203): wp_dashboard()
#47 {main}
  thrown

Toine 🇳🇱

patrickkivits commented 1 year ago

Hi @toineenzo

Sorry for the late response!

It seems that the issues was caused by the bunq sdk dependency. I just updated all the composer dependencies in v1.2.7, so the issue should be solved by using this version: https://github.com/patrickkivits/bunq-for-woocommerce/releases/tag/v1.2.7

I hope this fixes it for you, if not, feel free to re-open this issue or reach out again!

toineenzo commented 1 year ago

Awesome! Will let you know if it works :) Edit: it works fine now :)