Home Forums WoodMart support forum Wishlist: WordPress database error Unknown column ‘on_sale’

Wishlist: WordPress database error Unknown column ‘on_sale’

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #570035

    jackennils
    Participant

    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.
    #570092

    Artem Temos
    Keymaster
    Xtemos team

    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.

    #570335

    jackennils
    Participant

    Hello Artem,

    Done! Please see extra information field for the requested login credentials.

    Thanks
    Marco

    #570422

    Artem Temos
    Keymaster
    Xtemos team

    Sorry, but the password seems to be wrong, and we can’t access your dashboard.

    #570635

    jackennils
    Participant

    Can you check again please? It works for me.

    #570731

    Artem Temos
    Keymaster
    Xtemos team

    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"
    		);
    	}
    );
    #570923

    jackennils
    Participant

    Excellent, that worked.

    Thank you Artem! 🙂

    #570955

    Artem Temos
    Keymaster
    Xtemos team

    Great, you are welcome! Feel free to contact us if you have any further questions.

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Wishlist: WordPress database error Unknown column ‘on_sale’’ is closed to new replies.