Fatal error when restoring an order
-
When I want to restore the order 32563 I got this error :
Une erreur de type E_ERROR a été causée dans la ligne 162 du fichier /home/clients/d7bf10939291893c863cc14c2f85095f/sites/nandara.com/wp-content/plugins/wp-security-audit-log/classes/WPSensors/class-woocommerce-public-sensor.php. Message d’erreur : Uncaught TypeError: method_exists(): Argument #1 ($object_or_class) must be of type object|string, null given in /home/clients/d7bf10939291893c863cc14c2f85095f/sites/nandara.com/wp-content/plugins/wp-security-audit-log/classes/WPSensors/class-woocommerce-public-sensor.php:162 Stack trace: #0 /home/clients/d7bf10939291893c863cc14c2f85095f/sites/nandara.com/wp-content/plugins/wp-security-audit-log/classes/WPSensors/class-woocommerce-public-sensor.php(162): method_exists(NULL, ‘get_id’) #1 /home/clients/d7bf10939291893c863cc14c2f85095f/sites/nandara.com/wp-content/plugins/wp-security-audit-log/classes/WPSensors/class-woocommerce-public-sensor.php(419): WSAL\WP_Sensors\WooCommerce_Public_Sensor::get_editor_link(NULL) #2 /home/clients/d7bf10939291893c863cc14c2f85095f/sites/nandara.com/wp-includes/class-wp-hook.php(341): WSAL\WP_Sensors\WooCommerce_Public_Sensor::product_stock_changed(Object(WC_Product_Variation)) #3 /home/clients/d7bf10939291893c863cc14c2f85095f/sites/nandara.com/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(NULL, Array) #4 /home/clients/d7bf10939291893c863cc14c2f85095f/sites/nandara.com/wp-includes/plugin.php(522): WP_Hook->do_action(Array) #5 /home/clients/d7bf10939291893c863cc14c2f85095f/sites/nandara.com/wp-content/plugins/woocommerce/includes/wc-stock-functions.php(71): do_action(‘woocommerce_var…’, Object(WC_Product_Variation)) #6 /home/clients/d7bf10939291893c863cc14c2f85095f/sites/nandara.com/wp-content/plugins/woocommerce/includes/wc-stock-functions.php(201): wc_update_product_stock(Object(WC_Product_Variation), 1, ‘decrease’) #7 /home/clients/d7bf10939291893c863cc14c2f85095f/sites/nandara.com/wp-content/plugins/woocommerce/includes/wc-stock-functions.php(119): wc_reduce_stock_levels(32568) #8 /home/clients/d7bf10939291893c863cc14c2f85095f/sites/nandara.com/wp-includes/class-wp-hook.php(343): wc_maybe_reduce_stock_levels(32568) #9 /home/clients/d7bf10939291893c863cc14c2f85095f/sites/nandara.com/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(NULL, Array) #10 /home/clients/d7bf10939291893c863cc14c2f85095f/sites/nandara.com/wp-includes/plugin.php(522): WP_Hook->do_action(Array) #11 /home/clients/d7bf10939291893c863cc14c2f85095f/sites/nandara.com/wp-content/plugins/woocommerce/includes/class-wc-order.php(451): do_action(‘woocommerce_ord…’, 32568, Object(Automattic\WooCommerce\Admin\Overrides\Order), Array) #12 /home/clients/d7bf10939291893c863cc14c2f85095f/sites/nandara.com/wp-content/plugins/woocommerce/includes/class-wc-order.php(285): WC_Order->status_transition() #13 /home/clients/d7bf10939291893c863cc14c2f85095f/sites/nandara.com/wp-content/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php(2753): WC_Order->save() #14 /home/clients/d7bf10939291893c863cc14c2f85095f/sites/nandara.com/wp-content/plugins/woocommerce/src/Internal/Admin/Orders/ListTable.php(1604): Automattic\WooCommerce\Internal\DataStores\Orders\OrdersTableDataStore->untrash_order(Object(Automattic\WooCommerce\Admin\Overrides\Order)) #15 /home/clients/d7bf10939291893c863cc14c2f85095f/sites/nandara.com/wp-content/plugins/woocommerce/src/Internal/Admin/Orders/ListTable.php(1468): Automattic\WooCommerce\Internal\Admin\Orders\ListTable->do_untrash(Array) #16 /home/clients/d7bf10939291893c863cc14c2f85095f/sites/nandara.com/wp-content/plugins/woocommerce/src/Internal/Admin/Orders/PageController.php(319): Automattic\WooCommerce\Internal\Admin\Orders\ListTable->handle_bulk_actions() #17 /home/clients/d7bf10939291893c863cc14c2f85095f/sites/nandara.com/wp-content/plugins/woocommerce/src/Internal/Admin/Orders/PageController.php(167): Automattic\WooCommerce\Internal\Admin\Orders\PageController->setup_action_list_orders() #18 /home/clients/d7bf10939291893c863cc14c2f85095f/sites/nandara.com/wp-includes/class-wp-hook.php(341): Automattic\WooCommerce\Internal\Admin\Orders\PageController->handle_load_page_action(”) #19 /home/clients/d7bf10939291893c863cc14c2f85095f/sites/nandara.com/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(NULL, Array) #20 /home/clients/d7bf10939291893c863cc14c2f85095f/sites/nandara.com/wp-includes/plugin.php(522): WP_Hook->do_action(Array) #21 /home/clients/d7bf10939291893c863cc14c2f85095f/sites/nandara.com/wp-admin/admin.php(242): do_action(‘load-woocommerc…’) #22 {main} thrownCould you change the get_editor_link function when $post is not a post object or is null ?
The page I need help with: [log in to see the link]
You must be logged in to reply to this topic.