Upon applying mundane WordPress update in an eCommerce store based on WooCommerce the store crashed, and the error message said:
There has been a critical error on this website. Please check your site admin email inbox for instructions.
Learn more about troubleshooting WordPress.
“This is awesome” — said I and after logging in recovery mode info WordPress Admin I noticed
One or more plugins failed to load properly.
You can find more details and make changes on the Plugins screen.
At the bottom of the email the Error Details were
Uncaught RuntimeException: Unable to claim actions. Database error: Unknown column 'priority' in 'order clause'. in plugins/woocommerce/packages/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php:942
Turned out that the database user that WordPress is using lacked all the necessary privileges to change the structure of the database and during the upgrade of WooCommerce it was unable to add an additional column named `priority`
In order to solve this, you need to add this column manually. You can log into phpMyAdmin, click on table wp_actionscheduler_actions on the left, then cl;ick “Structure” tab and under the
Now the most important part. Add the field with the following params:
Name: priority | Type:tinyint(3) | UNSIGNED | Null: No | Default: 10 |
---|
Voila, problem solved! The field is added with default number value of 10 and WooCommerce should be working!