Wishlist: WordPress database error Unknown column ‘on_sale’
-
Hello!
My php log is full of these entries:
[02-Jun-2024 09:56:53 UTC] WordPress database error Unknown column ‘on_sale’ in ‘field list’ for query UPDATEwp_woodmart_wishlist_productsSETon_sale= ‘1’ WHEREproduct_id= ‘10391’ made by do_action_ref_array(‘woodmart_wishlist_register_on_sales_products’), WP_Hook->do_action, WP_Hook->apply_filters, XTS\WC_Wishlist\Send_On_Sales_Products->register_on_sales_products, XTS\WC_Wishlist\Send_On_Sales_Products->update_on_sale_for_product
The wishlist seems to work normal, though. How to solve the issue?
-
This topic was modified 2 years, 1 month ago by
jackennils.
Hello,
Please disable any plugins not directly related to our theme and provide us with your admin and FTP access details. We will log in to your dashboard and investigate the issue. Please ensure that you only keep the following plugins that are necessary for our theme to work correctly:
– WoodMart core
– WooCommerce
– Elementor/WPBakery Page Builder
Thank you in advance.
Hello Artem,
Done! Please see extra information field for the requested login credentials.
Thanks
Marco
Sorry, but the password seems to be wrong, and we can’t access your dashboard.
Can you check again please? It works for me.
Try to add the following code to the functions.php file in your child theme. Open your website home page and then remove the code .It should fix the error.
add_action(
'init',
function() {
global $wpdb;
require_once( ABSPATH . 'wp-admin/install-helper.php' );
maybe_add_column(
$wpdb->woodmart_products_table,
'on_sale',
"ALTER TABLE $wpdb->woodmart_products_table
ADD COLUMN on_sale boolean NOT NULL
AFTER date_added"
);
}
);
Excellent, that worked.
Thank you Artem! 🙂
Great, you are welcome! Feel free to contact us if you have any further questions.
The topic ‘Wishlist: WordPress database error Unknown column ‘on_sale’’ is closed to new replies.