• Hi,

    After upgrading to 1.0.2 we can’t edit products (none of the product fields are loaded), our dashboard shows critical error and I found the following error on our debug.log:

    PHP Fatal error: Uncaught TypeError: WCPOS\WooCommercePOS\Gateways::available_payment_gateways(): Argument #1 ($gateways) must be of type array, null given, called in /data/wordpress/wp-includes/class-wp-hook.php on line 308 and defined in /data/wordpress/wp-content/plugins/woocommerce-pos/includes/Gateways.php:56

    All the problems described disappear when I deactivate WooCommerce POS

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author kilbot

    (@kilbot)

    For the moment, can you please re-install the previous version: https://downloads.www.ads-software.com/plugin/woocommerce-pos.0.4.27.zip

    Can you please also post the full stack trace from the logs. There will be a plugin that is calling the woocommerce_available_payment_gateways filter incorrectly.

    Thread Starter anteroriihimaki

    (@anteroriihimaki)

    Thanks for a quick reply.

    Here’s the full stack trace:

    [10-May-2023 06:32:19 UTC] PHP Fatal error: Uncaught TypeError: WCPOS\WooCommercePOS\Gateways::available_payment_gateways(): Argument #1 ($gateways) must be of type array, null given, called in /data/wordpress/wp-includes/class-wp-hook.php on line 308 and defined in /data/wordpress/wp-content/plugins/woocommerce-pos/includes/Gateways.php:56Stack trace:#0 /data/wordpress/wp-includes/class-wp-hook.php(308): WCPOS\WooCommercePOS\Gateways->available_payment_gateways()#1 /data/wordpress/wp-includes/plugin.php(205): WP_Hook->apply_filters()#2 /data/wordpress/wp-content/plugins/woocommerce/includes/class-wc-payment-gateways.php(163): apply_filters()#3 /data/wordpress/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/CheckoutSchema.php(122): WC_Payment_Gateways->get_available_payment_gateways()#4 /data/wordpress/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/AbstractSchema.php(62): Automattic\WooCommerce\StoreApi\Schemas\V1\CheckoutSchema->get_properties()#5 /data/wordpress/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Routes/V1/AbstractRoute.php(85): Automattic\WooCommerce\StoreApi\Schemas\V1\AbstractSchema->get_item_schema()#6 /data/wordpress/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Routes/V1/AbstractRoute.php(265): Automattic\WooCommerce\StoreApi\Routes\V1\AbstractRoute->get_item_schema()#7 /data/wordpress/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Routes/V1/Checkout.php(71): Automattic\WooCommerce\StoreApi\Routes\V1\AbstractRoute->get_context_param()#8 /data/wordpress/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/RoutesController.php(113): Automattic\WooCommerce\StoreApi\Routes\V1\Checkout->get_args()#9 /data/wordpress/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/RoutesController.php(68): Automattic\WooCommerce\StoreApi\RoutesController->register_routes()#10 /data/wordpress/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/StoreApi.php(28): Automattic\WooCommerce\StoreApi\RoutesController->register_all_routes()#11 /data/wordpress/wp-includes/class-wp-hook.php(308): Automattic\WooCommerce\StoreApi\StoreApi->Automattic\WooCommerce\StoreApi\{closure}()#12 /data/wordpress/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()#13 /data/wordpress/wp-includes/plugin.php(517): WP_Hook->do_action()#14 /data/wordpress/wp-includes/rest-api.php(577): do_action()#15 /data/wordpress/wp-includes/rest-api.php(535): rest_get_server()#16 /data/wordpress/wp-includes/rest-api.php(2889): rest_do_request()#17 [internal function]: rest_preload_api_request()#18 /data/wordpress/wp-content/plugins/woocommerce/src/Internal/Admin/Settings.php(145): array_reduce()#19 /data/wordpress/wp-includes/class-wp-hook.php(308): Automattic\WooCommerce\Internal\Admin\Settings->add_component_settings()#20 /data/wordpress/wp-includes/plugin.php(205): WP_Hook->apply_filters()#21 /data/wordpress/wp-content/plugins/woocommerce/src/Internal/Admin/WCAdminSharedSettings.php(61): apply_filters()#22 /data/wordpress/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/Assets/AssetDataRegistry.php(282): Automattic\WooCommerce\Internal\Admin\WCAdminSharedSettings->Automattic\WooCommerce\Internal\Admin\{closure}()#23 /data/wordpress/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/Assets/AssetDataRegistry.php(383): Automattic\WooCommerce\Blocks\Assets\AssetDataRegistry->execute_lazy_data()#24 /data/wordpress/wp-includes/class-wp-hook.php(308): Automattic\WooCommerce\Blocks\Assets\AssetDataRegistry->enqueue_asset_data()#25 /data/wordpress/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()#26 /data/wordpress/wp-includes/plugin.php(517): WP_Hook->do_action()#27 /data/wordpress/wp-admin/admin-footer.php(95): do_action()#28 /data/wordpress/wp-admin/edit.php(502): require_once(‘…’)#29 {main} thrown in /data/wordpress/wp-content/plugins/woocommerce-pos/includes/Gateways.php on line 56

    Thread Starter anteroriihimaki

    (@anteroriihimaki)

    Here’s link to the same stack trace as a log file: https://www.dropbox.com/s/sktjx9peqxcxw7a/woocommercepos.log?dl=0

    Thread Starter anteroriihimaki

    (@anteroriihimaki)

    I installed the older version and the problems stopped, but new one appears. Now when I try to use POS it gives me the following error and won’t let me process payment for the products I’v added to cart on POS.

    Warning: The magic method WC_POS_Admin_Settings_Abstract::__wakeup() must have public visibility in /data/wordpress/wp-content/plugins/woocommerce-pos/includes/admin/settings/class-wc-pos-abstract.php on line 33

    Plugin Author kilbot

    (@kilbot)

    Thanks for providing the logs. The first problem (with v1) seems to be due to WooCommerce Blocks, while the second issue (with 0.4.27) is due to it not being compatible with PHP8.

    The first issue can be fixed with a simple hot patch, so why don’t we try that first. Can you jump into Discord chat? It’s faster if I provide support there: https://wcpos.com/discord

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Error after upgrading to 1.0.2’ is closed to new replies.