Support » Plugin: Order Status History for WooCommerce » The plugin gives me a fatal error

  • Resolved izquierdocreativo


    Hi, the plugin gives me a fatal error, although it does not break my website.
    I leave the information I have about the problem here in case it helps.
    Thank you.

    WordPress version 5.8.1
    Current theme: Astra Child Theme (version 1.0.0)
    Current plugin: Order Status History for WooCommerce (version 1.7.1)
    PHP version 7.4.23

    Error details
    An error of type E_ERROR occurred on line 150 of the file /home/customer/www/——— woocommerce / includes / admin / order-history-product.php. Error message: Uncaught Error: Call to a member function get_sku () on bool in /home/customer/www/——— history-for-woocommerce / includes / admin / order-history-product.php: 150
    Stack trace:
    # 0 / home / customer / www / ———-. Com / public_html / wp-content / plugins / order-status-history-for-woocommerce / includes / admin / order-history.php ( 40): include ()
    # 1 /home/customer/www/——— include (‘/ home / customer / …’)
    # 2 /home/customer/www/——— oshwoo \ osh-> add_order_history (”)
    # 3 /home/customer/www/——— WP_Hook-> apply_filters (”, Array)
    # 4 /home/customer/www/——— WP_Hook-> do_action (Array)
    # 5 /home/customer/www/——— do_action (‘woocommerce_pag …’)
    # 6 {main}

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author alx359


    Thank you for your report.

    Could you please tell if the order giving issues contains product variations, and if its SKU (if any) is specific to said variation?

    Plugin Author alx359


    Never mind. Have pushed 1.7.2 that handles SKU display in a different and finer-grain manner (now differentiates variation SKU from product SKU), and it shouldn’t produce any fatal errors on edge scenarios anymore. Please check and report back though, as frankly I’m not sure yet why you got this error in the first place. Thanks.

    Thread Starter izquierdocreativo


    Hi, with the update the fatal error no longer appears. The place where the error occurs is a user who had not placed an order for 4 years and when showing the history of their orders, those of 2017 appear with a date of 1970, which is quite rare .. it may be that this is where the error comes from fatal??
    Thank you so much for everything.

    Plugin Author alx359


    Thanks for following up, and confirm the fatal error issue was resolved your end.

    those of 2017 appear with a date of 1970

    That usually means the date is invalid or in an unrecognized format for some reason, and it defaults to something like 01-01-1970 I think. Shall have a look later and see if we can handle it more gracefully for an upcoming version.

    As the fatal error was resolved, I’m closing this ticket now, but please do not hesitate to write back if you may encounter any other issues.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.