• Resolved kejserjorn

    (@kejserjorn)


    Hi,

    I get a fatal error on my website when I visit the “Orders” menu in Woocommerce with HPOS enabled and I can’t figure out why this happens.

    The posts and orders tables are in sync and no plugins are flagged as incompatible. It has worked before but now this happens every time and the only solution (that I found) is to disable HPOS again while in recovery mode.

    I did switch my payment gateway recently but the problem also happened before with the previous gateway. Both should be compatible with HPOS according to the developers. I also get the error when no payment gateway at all is enabled.

    Steps to reproduce:

    • Enable HPOS in Woocommerce Advanced Settings.
    • Click the “Orders” menu in Woocommerce

    Below is the fatal error log entry

    Can anyone help me pinpoint what is happening? Thank You

    2023-09-07T12:27:29+00:00 CRITICAL Uncaught TypeError: Automattic\WooCommerce\Utilities\ArrayUtil::deep_assoc_array_diff(): Argument #2 ($array2) must be of type array, null given, called in /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/src/Utilities/ArrayUtil.php on line 257 and defined in /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/src/Utilities/ArrayUtil.php:233
    Stack trace:
    #0 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/src/Utilities/ArrayUtil.php(257): Automattic\WooCommerce\Utilities\ArrayUtil::deep_assoc_array_diff()
    #1 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/src/Utilities/ArrayUtil.php(234): Automattic\WooCommerce\Utilities\ArrayUtil::deep_compute_or_compare_array_diff()
    #2 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php(1307): Automattic\WooCommerce\Utilities\ArrayUtil::deep_assoc_array_diff()
    #3 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php(1253): Automattic\WooCommerce\Internal\DataStores\Orders\OrdersTableDataStore->get_diff_meta_data_between_orders()
    #4 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php(1140): Automattic\WooCommerce\Internal\DataStores\Orders\OrdersTableDataStore->is_post_different_from_order()
    #5 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php(1065): Automattic\WooCommerce\Internal\DataStores\Orders\OrdersTableDataStore->maybe_sync_order()
    #6 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(171): Automattic\WooCommerce\Internal\DataStores\Orders\OrdersTableDataStore->read_multiple()
    #7 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/includes/class-wc-order-factory.php(123): WC_Data_Store->read_multiple()
    #8 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php(2556): WC_Order_Factory::get_orders()
    #9 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(224): Automattic\WooCommerce\Internal\DataStores\Orders\OrdersTableDataStore->query()
    #10 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/includes/class-wc-order-query.php(87): WC_Data_Store->__call()
    #11 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/includes/wc-order-functions.php(69): WC_Order_Query->get_orders()
    #12 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/src/Internal/Admin/Orders/ListTable.php(403): wc_get_orders()
    #13 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/src/Internal/Admin/Orders/PageController.php(302): Automattic\WooCommerce\Internal\Admin\Orders\ListTable->prepare_items()
    #14 /home/kejserjo/domains/susannerylander.com/public_html/wp-includes/class-wp-hook.php(310): Automattic\WooCommerce\Internal\Admin\Orders\PageController->output()
    #15 /home/kejserjo/domains/susannerylander.com/public_html/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #16 /home/kejserjo/domains/susannerylander.com/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
    #17 /home/kejserjo/domains/susannerylander.com/public_html/wp-admin/admin.php(259): do_action()
    #18 {main}
      thrown i /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/src/Utilities/ArrayUtil.php p? linje 233
    
    2023-09-07T15:57:32+00:00 CRITICAL Uncaught TypeError: Automattic\WooCommerce\Utilities\ArrayUtil::deep_assoc_array_diff(): Argument #2 ($array2) must be of type array, null given, called in /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/src/Utilities/ArrayUtil.php on line 257 and defined in /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/src/Utilities/ArrayUtil.php:233
    Stack trace:
    #0 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/src/Utilities/ArrayUtil.php(257): Automattic\WooCommerce\Utilities\ArrayUtil::deep_assoc_array_diff()
    #1 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/src/Utilities/ArrayUtil.php(234): Automattic\WooCommerce\Utilities\ArrayUtil::deep_compute_or_compare_array_diff()
    #2 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php(1307): Automattic\WooCommerce\Utilities\ArrayUtil::deep_assoc_array_diff()
    #3 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php(1253): Automattic\WooCommerce\Internal\DataStores\Orders\OrdersTableDataStore->get_diff_meta_data_between_orders()
    #4 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php(1140): Automattic\WooCommerce\Internal\DataStores\Orders\OrdersTableDataStore->is_post_different_from_order()
    #5 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php(1065): Automattic\WooCommerce\Internal\DataStores\Orders\OrdersTableDataStore->maybe_sync_order()
    #6 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(171): Automattic\WooCommerce\Internal\DataStores\Orders\OrdersTableDataStore->read_multiple()
    #7 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/includes/class-wc-order-factory.php(123): WC_Data_Store->read_multiple()
    #8 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php(2556): WC_Order_Factory::get_orders()
    #9 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(224): Automattic\WooCommerce\Internal\DataStores\Orders\OrdersTableDataStore->query()
    #10 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/includes/class-wc-order-query.php(87): WC_Data_Store->__call()
    #11 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/includes/wc-order-functions.php(69): WC_Order_Query->get_orders()
    #12 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/src/Internal/Admin/Orders/ListTable.php(403): wc_get_orders()
    #13 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/src/Internal/Admin/Orders/PageController.php(302): Automattic\WooCommerce\Internal\Admin\Orders\ListTable->prepare_items()
    #14 /home/kejserjo/domains/susannerylander.com/public_html/wp-includes/class-wp-hook.php(310): Automattic\WooCommerce\Internal\Admin\Orders\PageController->output()
    #15 /home/kejserjo/domains/susannerylander.com/public_html/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #16 /home/kejserjo/domains/susannerylander.com/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
    #17 /home/kejserjo/domains/susannerylander.com/public_html/wp-admin/admin.php(259): do_action()
    #18 {main}
      thrown i /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/src/Utilities/ArrayUtil.php p? linje 233
    
    2023-09-07T15:58:06+00:00 CRITICAL Uncaught TypeError: Automattic\WooCommerce\Utilities\ArrayUtil::deep_assoc_array_diff(): Argument #2 ($array2) must be of type array, null given, called in /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/src/Utilities/ArrayUtil.php on line 257 and defined in /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/src/Utilities/ArrayUtil.php:233
    Stack trace:
    #0 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/src/Utilities/ArrayUtil.php(257): Automattic\WooCommerce\Utilities\ArrayUtil::deep_assoc_array_diff()
    #1 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/src/Utilities/ArrayUtil.php(234): Automattic\WooCommerce\Utilities\ArrayUtil::deep_compute_or_compare_array_diff()
    #2 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php(1307): Automattic\WooCommerce\Utilities\ArrayUtil::deep_assoc_array_diff()
    #3 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php(1253): Automattic\WooCommerce\Internal\DataStores\Orders\OrdersTableDataStore->get_diff_meta_data_between_orders()
    #4 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php(1140): Automattic\WooCommerce\Internal\DataStores\Orders\OrdersTableDataStore->is_post_different_from_order()
    #5 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php(1065): Automattic\WooCommerce\Internal\DataStores\Orders\OrdersTableDataStore->maybe_sync_order()
    #6 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(171): Automattic\WooCommerce\Internal\DataStores\Orders\OrdersTableDataStore->read_multiple()
    #7 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/includes/class-wc-order-factory.php(123): WC_Data_Store->read_multiple()
    #8 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php(2556): WC_Order_Factory::get_orders()
    #9 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(224): Automattic\WooCommerce\Internal\DataStores\Orders\OrdersTableDataStore->query()
    #10 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/includes/class-wc-order-query.php(87): WC_Data_Store->__call()
    #11 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/includes/wc-order-functions.php(69): WC_Order_Query->get_orders()
    #12 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/src/Internal/Admin/Orders/ListTable.php(403): wc_get_orders()
    #13 /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/src/Internal/Admin/Orders/PageController.php(302): Automattic\WooCommerce\Internal\Admin\Orders\ListTable->prepare_items()
    #14 /home/kejserjo/domains/susannerylander.com/public_html/wp-includes/class-wp-hook.php(310): Automattic\WooCommerce\Internal\Admin\Orders\PageController->output()
    #15 /home/kejserjo/domains/susannerylander.com/public_html/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #16 /home/kejserjo/domains/susannerylander.com/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
    #17 /home/kejserjo/domains/susannerylander.com/public_html/wp-admin/admin.php(259): do_action()
    #18 {main}
      thrown i /home/kejserjo/domains/susannerylander.com/public_html/wp-content/plugins/woocommerce/src/Utilities/ArrayUtil.php p? linje 233
Viewing 1 replies (of 1 total)
  • Saif

    (@babylon1999)

    Hello @kejserjorn,

    Thank you for reaching out!

    A fix was already pushed for this issue in WooCommerce version 8.1.0. You can refer to the report here: https://github.com/woocommerce/woocommerce/issues/39637

    The update should be released September 12th, so hopefully today (not sure if there will be any delays). In the meantime, you can switch back to using the default WordPress post table. You also have the option to erase the HPOS tables that you’ve already set up. You can do this from WooCommerce → Status → Tools.


    Link to image: https://d.pr/i/9AU6s0

    Let us know if you have any other questions. :?)

Viewing 1 replies (of 1 total)
  • The topic ‘HPOS fatal error’ is closed to new replies.