• Resolved Dom

    (@jgmdom)


    Hi

    When splitting an order, if “Splitted order(s) status” is set as “Default” then the new order (child order) has the same Order Status as the parent. However, if I set “Splitted order(s) status” to anything else, such as “on-hold”, the Order Status is actually changed to “Pending payment”.

    Here is a video of what is happening: https://www.loom.com/share/7c16f795d886458a9f9ee492f840ef58

    Please can you tell me if I am doing something wrong, or advise on how I can set the status of the child order to On Hold?

    Thanks
    Dom

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Fahad Mahmood

    (@fahadmahmood)

    Dear Dom,

    With please check your edit order page, right sidebar, maybe order changed to on-hold and further changed to pending, please confirm if it is happening.

    Thanks,
    Fahad

    Thread Starter Dom

    (@jgmdom)

    Hi Fahad,

    Thank you for the quick response! I have checked the order notes and it has only changed from the original status to payment pending. I have attached a screenshot.

    Thanks,
    Dom

    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    Then try running crons using the advanced settings tab, cron settings inside. Some extra scripts need to run separately.

    Thread Starter Dom

    (@jgmdom)

    How exactly do I do that? This is what I see on the advance settings / crons

    What file/function sets the new order status? I can then debug in there why it’s not setting the correct status.

    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    There are many files, I need to look into it to guide you. Please use the urgent help option instead, under the help tab on the settings page. Cron job, first url with curl, you need to set that somewhere in your hosting account cpanel etc.

    Thread Starter Dom

    (@jgmdom)

    Hi Fahad

    I’m done some debugging and think I’ve located the issue.

    File: woo-order-splitter/inc/functions.php
    Line 10872: $status = apply_filters('wc_os_split_order_status_logic_hook', $order, $status);

    This returns an Order object, not a status. Therefore, when it tries to set the status further down (lines 10885 & 10886) it fails.

    I have commented out line 10872 and 10885 and updated line 10886 to $order->set_status($status); and this now works.

    I have created a patch for this so it works on out system. However, it would be great if you could look into this and publish a core fix?

    Thanks

    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    Thank you so much for this input but when I revisit the filter hook, I am seeing the string type being returned. I have improved that function and now it will return order status instead of order object. Hopefully next version will work without any issue for you.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Change status of split orders not working’ is closed to new replies.