Support » Plugin: Jilt for WooCommerce » Deprecated WooCommerce function

  • Resolved kiwiquads

    (@kiwiquads)


    Hi there,

    There is a function in your plugin which uses the deprecated woocommerce function
    get_product_from_item

    Specifically, line 583 and 677 in /includes/class-wc-jilt-order.php

    The deprecated function is creating error messages in our log, which are so large they cause a buffer overflow and create a 502 error. How do I know? I just spent the last 5 hours looking for the problem 🙂

    When other integrations try to use the WooCommerce order API, the Jilt plugin gets called and triggers this error and returns a 502.

    Could you please update the plug-in to remove this dependancy?
    I would greatly appreciate it.

    If you have any questions about this issue, please let me know.

    2020/09/09 05:48:21 [error] 4870#4870: *2572 FastCGI sent in stderr: "PHP message: The WC_Abstract_Legacy_Order::get_product_from_item function is deprecated since version 4.4.0. Replace with $item->get_product().PHP message: The WC_Abstract_Legacy_Order::get_product_from_item function is deprecated since version 4.4.0. Replace with $item->get_product().PHP message: The WC_Abstract_Legacy_Order::get_product_from_item function is deprecated since version 4.4.0. Replace with $item->get_product().PHP message: The WC_Abstract_Legacy_Order::get_product_from_item function is deprecated since version 4.4.0. Replace with $item->get_product().PHP message: The WC_Abstract_Legacy_Order::get_product_from_item function is deprecated since version 4.4.0. Replace with $item->get_product().PHP message: The WC_Abstract_Legacy_Order::get_product_from_item function is deprecated since version 4.4.0. Replace with $item->get_product().

    • This topic was modified 2 months, 3 weeks ago by kiwiquads.
Viewing 6 replies - 1 through 6 (of 6 total)
  • As someone who’s been digging into finding the cause of a 502 error on a site using Jilt, I can confirm the issue above is impacting sites and is not an isolated issue.

    We’re experiencing the exact same errors in our log related to get_product_from_item and are getting intermittent 502 errors.

    Thanks for your confirmation and reply @bkidd85

    If you are dependent on this plugin, I will try to make the adaptation myself and publish a fixed workaround. In the meantime, you can try to suppress the error in your logs or increase your fastcgi buffer and see if that helps (didn’t for me).

    However I would really like to see this acknowledged and fixed by the developer. It should be a fairly trivial fix to make.

    Plugin Support ryanskyverge

    (@ryanskyverge)

    Hi @kiwiquads and @bkidd85

    Ryan from Jilt support here. Thanks for alerting us to this and for your investigation into the issue. I’m very sorry for the disruption this has caused for your site.

    I have alerted our developers to this issue and they are prioritizing a fix. I’ll be happy to keep you updated here on their progress.

    Can I help with any questions or concerns in the meantime?

    Ryan

    @ryanskyverge thanks very much for your reply.

    Please keep us updated 🙂

    Plugin Support ryanskyverge

    (@ryanskyverge)

    Hi @kiwiquads and @bkidd85

    Thanks for your patience here. A fix for this issue was released as part of v1.7.9 of Jilt for WooCommerce which was released today. To resolve the error, please update the Jilt for WooCommerce plugin at your earliest convenience.

    All the best,
    Ryan

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