in my case it happened because woocommerce didn’t installed some tables. Check woocommerce system status and check woocommerce_order_items table exists.
Hope this would help for someone.
CREATE TABLE IF NOT EXISTS wp_woocommerce_order_items
(
order_item_id
bigint(20) NOT NULL,
order_item_name
longtext NOT NULL,
order_item_type
varchar(200) NOT NULL DEFAULT ”,
order_id
bigint(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
—
— Indexes for dumped tables
—
—
— Indexes for table wp_woocommerce_order_items
—
ALTER TABLE wp_woocommerce_order_items
ADD PRIMARY KEY (order_item_id
), ADD KEY order_id
(order_id
);
—
— AUTO_INCREMENT for dumped tables
—
—
— AUTO_INCREMENT for table wp_woocommerce_order_items
—
ALTER TABLE wp_woocommerce_order_items
MODIFY order_item_id
bigint(20) NOT NULL AUTO_INCREMENT;