• Resolved thisisnuts

    (@thisisnuts)


    How can i trouble shoot or fix this error?

    AH01071: Got error ‘PHP message: WordPress database error Unknown column ‘order_item_id’ in ‘where clause’ for query UPDATE wp_wc_order_coupon_lookup SET discount_amount = 0.000000 WHERE order_id = 57618 AND order_item_id = 0 made by do_action(‘wp_ajax_nopriv_as_async_request_queue_runner’), WP_Hook->do_action, WP_Hook->apply_filters, WP_Async_Request->maybe_handle, ActionScheduler_AsyncRequest_QueueRunner->handle, do_action(‘action_scheduler_run_queue’), WP_Hook->do_action, WP_Hook->apply_filters, ActionScheduler_QueueRunner->run, ActionScheduler_QueueRunner->do_batch, ActionScheduler_Abstract_QueueRunner->process_action, ActionScheduler_Action->execute, do_action_ref_array(‘wc-admin_import_orders’), WP_Hook->do_action, WP_Hook->apply_filters, Automattic\WooCommerce\Internal\Admin\Schedulers\ImportScheduler::do_action_or_reschedule, call_user_func_array, Automattic\WooCommerce\Internal\Admin\Schedulers\OrdersScheduler::import, Automattic\WooCommerce\Admin\API\Reports\Coupons\DataStore::sync_order_coupons, do…; PHP message: WordPress database error Unknown column ‘order_item_id’ in ‘where clause’ for query UPDATE wp_wc_order_coupon_lookup SET discount_amount = 0.000000 WHERE order_id = 57617 AND order_item_id = 0 made by do_action(‘wp_ajax_nopriv_as_async_request_queue_runner’), WP_Hook->do_action, WP_Hook->apply_filters, WP_Async_Request->maybe_handle, ActionScheduler_AsyncRequest_QueueRunner->handle, do_action(‘action_scheduler_run_queue’), WP_Hook->do_action, WP_Hook->apply_filters, ActionScheduler_QueueRunner->run, ActionScheduler_QueueRunner->do_batch, ActionScheduler_Abstract_QueueRunner->process_action, ActionScheduler_Action->execute, do_action_ref_array(‘wc-admin_import_orders’), WP_Hook->do_action, WP_Hook->apply_filters, Automattic\WooCommerce\Internal\Admin\Schedulers\ImportScheduler::do_action_or_reschedule, call_user_func_array, Automattic\WooCommerce\Internal\Admin\Schedulers\OrdersScheduler::import, Automattic\WooCommerce\Admin\API\Reports\Coupons\DataStore::sync_order_coupons, do…; PHP message: WordPress database error Unknown column ‘order_item_id’ in ‘where clause’ for query UPDATE wp_wc_order_coupon_lookup SET discount_amount = 0.000000 WHERE order_id = 57615 AND order_item_id = 0 made by do_action(‘wp_ajax_nopriv_as_async_request_queue_runner’), WP_Hook->do_action, WP_Hook->apply_filters, WP_Async_Request->maybe_handle, ActionScheduler_AsyncRequest_QueueRunner->handle, do_action(‘action_scheduler_run_queue’), WP_Hook->do_action, WP_Hook->apply_filters, ActionScheduler_QueueRunner->run, ActionScheduler_QueueRunner->do_batch, ActionScheduler_Abstract_QueueRunner->process_action, ActionScheduler_Action->execute, do_action_ref_array(‘wc-admin_import_orders’), WP_Hook->do_action, WP_Hook->apply_filters, Automattic\WooCommerce\Internal\Admin\Schedulers\ImportScheduler::do_action_or_reschedule, call_user_func_array, Automattic\WooCommerce\Internal\Admin\Schedulers\OrdersScheduler::import, Automattic\WooCommerce\Admin\API\Reports\Coupons\DataStore::sync_order_coupons, do…’


    Here is the schema for the table

    mysql> DESCRIBE wp_wc_order_coupon_lookup;
    +—————–+—————–+——+—–+———————+——-+
    | Field | Type | Null | Key | Default | Extra |
    +—————–+—————–+——+—–+———————+——-+
    | order_id | bigint unsigned | NO | PRI | NULL | |
    | coupon_id | bigint | NO | PRI | NULL | |
    | date_created | datetime | NO | MUL | 0000-00-00 00:00:00 | |
    | discount_amount | double | NO | | 0 | |
    +—————–+—————–+——+—–+———————+——-+
    4 rows in set (0.00 sec)

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter thisisnuts

    (@thisisnuts)

    Any help on this would be much appreciated

    Hi @thisisnuts

    Thanks for reaching out! I see that you’re experiencing a database issue when it’s expecting to find a column named order_item_id in the wp_wc_order_coupon_lookup table, but it can’t find it.

    To start, could you let me know if this error appeared after updating any plugins or making changes to your site setup? Also, are all your plugins and themes up to date?

    Cases like this can also happen due to an outdated database, a plugin, or custom code that affect database operations. To narrow it down, can you please send us a system status report? You can find it by going to WooCommerce → Status, selecting Get system report, and then Copy for Support.

    Looking forward to your response.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Unknown column ‘order_item_id’’ is closed to new replies.