• Resolved xist2support

    (@xist2support)


    Hi,

    We had the below error which crashed the site. Not sure of the root cause, but is this a known issue?

    WordPress version 5.8.2
    Current plugin: Ultimate Gift Cards For WooCommerce (version 2.2.2) PHP version 7.4.26

    Error Details
    =============
    An error of type E_ERROR was caused in line 800 of the file /home/476915.cloudwaysapps.com/mbryfjwnkm/public_html/wp-content/plugins/woo-gift-cards-lite/public/class-woocommerce-gift-cards-lite-public.php. Error message: Uncaught Error: Call to a member function is_type() on bool in /home/476915.cloudwaysapps.com/mbryfjwnkm/public_html/wp-content/plugins/woo-gift-cards-lite/public/class-woocommerce-gift-cards-lite-public.php:800
    Stack trace:
    #0 /home/476915.cloudwaysapps.com/mbryfjwnkm/public_html/wp-includes/class-wp-hook.php(305): Woocommerce_Gift_Cards_Lite_Public->mwb_wgm_woocommerce_order_status_changed()
    #1 /home/476915.cloudwaysapps.com/mbryfjwnkm/public_html/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
    #2 /home/476915.cloudwaysapps.com/mbryfjwnkm/public_html/wp-includes/plugin.php(470): WP_Hook->do_action()
    #3 /home/476915.cloudwaysapps.com/mbryfjwnkm/public_html/wp-content/plugins/woocommerce/includes/class-wc-order.php(374): do_action()
    #4 /home/476915.cloudwaysapps.com/mbryfjwnkm/public_html/wp-content/plugins/woocommerce/includes/class-wc-order.php(222): WC_Order->status_transition()
    #5 /home/476915.cloudwaysapps.com/mbryfjwnkm/public_html/wp-content/plugins/woocommerce/includes/admin/meta-boxes/cl

    • This topic was modified 2 years, 11 months ago by xist2support.
Viewing 1 replies (of 1 total)
  • Hello,

    Please replace the below code

    if ( ( isset( $product ) && isset( $product->product_type ) && ‘wgm_gift_card’ === $product->product_type ) || ‘on’ === $mwb_gift_product ) {
    $is_gift_card = true;
    }
    With this code public/class-woocommerce-gift-cards-lite-public.php line number 800 – 802
    It may resolve your issue.

    Regards,

Viewing 1 replies (of 1 total)
  • The topic ‘Fatal Error’ is closed to new replies.