Home › Forums › WoodMart support forum › Urgent Issue with Wishlist Functionality
Urgent Issue with Wishlist Functionality
- This topic has 3 replies, 2 voices, and was last updated 7 months ago by Artem Temos.
-
AuthorPosts
-
July 5, 2024 at 12:14 pm #581179
son0002ParticipantMy website’s wishlist feature is experiencing a critical error. I’ve included the error log below for your reference. Could you please assess whether this can be resolved with a patch or if a different solution is required?
July 5, 2024 at 12:41 pm #581201
Artem TemosKeymasterHello,
Please disable any plugins not directly related to our theme and provide us with your admin 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 BuilderThank you in advance.
July 5, 2024 at 1:28 pm #581227
son0002Participantmost likely the database table might have been accidentally deleted or corrupted, what would the solution be in this case? do l need manually recreating the missing table.
July 5, 2024 at 2:55 pm #581264
Artem TemosKeymasterTry to add the following PHP code snippet to the child theme functions.php file to fix this. You need to refresh your website once and then remove the code.
add_action( 'init', function () { require_once ABSPATH . 'wp-admin/includes/upgrade.php'; global $wpdb; $wishlists_table_name = $wpdb->prefix . 'woodmart_wishlists'; $wishlists_products_table_name = $wpdb->prefix . 'woodmart_wishlist_products'; $default_wishlist_name = esc_html__( 'My wishlist', 'woodmart' ); maybe_create_table( $wishlists_table_name, "CREATE TABLE {$wishlists_table_name} ( ID INT( 11 ) NOT NULL AUTO_INCREMENT, user_id INT( 11 ) NOT NULL, wishlist_group varchar( 255 ) DEFAULT '{$default_wishlist_name}' NOT NULL, date_created timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY ( ID ) ) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;" ); maybe_create_table( $wishlists_products_table_name, "CREATE TABLE {$wishlists_products_table_name} ( ID int( 11 ) NOT NULL AUTO_INCREMENT, product_id varchar( 255 ) NOT NULL, wishlist_id int( 11 ) NULL, date_added timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, on_sale boolean NOT NULL, PRIMARY KEY ( ID ), KEY ( product_id ) ) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;" ); } );
-
AuthorPosts
- You must be logged in to create new topics. Login / Register