Home Forums WoodMart support forum Fatal error when wishlist is disabled

Fatal error when wishlist is disabled

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #339937

    metuza
    Participant

    Hello,

    When i disable wishlist i get a non working quick view popup and the below fatal error in my debug log. Tested now on 2 sites and both has this same issue.

    [16-Dec-2021 10:24:11 UTC] PHP Fatal error: Uncaught Error: Class ‘XTS\WC_Wishlist\UI’ not found in /wp-content/themes/woodmart/inc/integrations/woocommerce/modules/quick-view.php:51
    Stack trace:
    #0 /wp-includes/class-wp-hook.php(303): woodmart_quick_view(‘1695’)
    #1 /wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters(”, Array)
    #2 /wp-includes/plugin.php(470): WP_Hook->do_action(Array)
    #3 /wp-admin/admin-ajax.php(187): do_action(‘wp_ajax_woodmar…’)
    #4 {main}
    thrown in /wp-content/themes/woodmart/inc/integrations/woocommerce/modules/quick-view.php on line 51

    Brgds
    Rune

    #339984

    Luke Nielsen
    Keymaster

    Hello,

    There is a bug in our theme so please find this file: woodmart\inc\integrations\woocommerce\modules\quick-view.php

    Then find this line:

    remove_action( 'woocommerce_single_product_summary', array( XTS\WC_Wishlist\UI::get_instance(), 'add_to_wishlist_single_btn' ), 33 );

    And replace with this one:

    if ( woodmart_get_opt( 'wishlist', 1 ) ) {
    	remove_action( 'woocommerce_single_product_summary', array( XTS\WC_Wishlist\UI::get_instance(), 'add_to_wishlist_single_btn' ), 33 );
    }

    If you have any questions please feel free to contact us.

    Best Regards

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