Support » Plugin: WooCommerce » Call to a member function update_status() on integer

  • Resolved Felipe Lenin


    So I have access via curl, with an API that is working normally, in case I want that when it gives me an X status, I can put that status in the order. example:

    $order = wc_get_order();
    $id = $order->get_id();
       case 0:
       echo $Status->date.': <strong>Arquivo Recebido</strong> </br>';
       $id->update_status('refund', 'order_note');


    [14-May-2021 19:36:00 UTC] PHP Fatal error: Uncaught Error: Call to a member function update_status() on integer in /home/

    • This topic was modified 5 months, 1 week ago by Felipe Lenin.

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support gabrielfuentes


    Hi there šŸ‘‹

    This is a fairly complex development topic. Iā€™m going to leave it open for a bit to see if anyone is able to chime in to help you out.

    I can also recommend the WooCommerce Developer Resources Portal for resources on developing for WooCommerce.

    You can also visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.


    Thread Starter Felipe Lenin


    Good Morning

    So in case the problem is not in the access with the API, this is only in the woocommerce function, update_status (), it shows me this error, then with that we see a scenario just thinking about the woocommerce function, leave the API aside.

    Plugin Support Shohan Hossain Nabil – a11n


    Hello @felipe-lenin,

    I am having a bit of trouble understanding what is your end goal here. Could you please explain a bit more about what are you trying to achieve so that I can point you in the right direction?


    Plugin Support gabrielfuentes


    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

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