• Resolved schero86

    (@schero86)


    Hello,

    After adding a tracking number is there a way to auto set a custom order status rather than “shipped”?

    Thanks!

    • This topic was modified 5 years, 10 months ago by schero86.
Viewing 9 replies - 1 through 9 (of 9 total)
  • I have the same need.

    I think you are seeing “shipped” because you have “renamed complete to shipped” ??

    In any event, the plugin has status ‘complete’ (wc-complete) HARD-CODED.

    One solution would be to treat the “add shipping” new status checkbox to act more like the partially shipped checkbox – with the new status being a user-specified value instead of HARD-CODED. Alternatively, implement a filter to catch it – that filter could also be used for ‘partially-shipped’, thereby giving the user even more flexibility and control. However, the latter would not provide proper text in the “add shipping” meta-boxes, so a combination would be best.

    In my case, I have a custom status (from a different plugin) of fully-shipped. This is useful because it does not trigger actions/filters that are tied to “new-status is complete” when such is not desired.

    Plugin Author Zorem

    (@zorem)

    Hi, AST renames the Completed order status label to Shipped. this order status is WooCommerce core and since its meaning is that the order fulfilled, we allow to do rename it to “Shipped” and we do not change its slug and we allow to mark orders as Shipped (Completed) when you add tracking info.

    The plugin allows you to enable the Partially Shipped order status which will also display in the options when you add tracking info and you can enable the Delivered order status which means the order is delivered to your customer.

    Can you explain what is your business workflow, which status you need to have?

    Thread Starter schero86

    (@schero86)

    Hello,

    Thank you for all your answers.
    I checked, tha Partially Shipped acts indeed as required, we will rename it as needed.

    Have a great day!

    Plugin Author Zorem

    (@zorem)

    ok, great LMK if you need further assistance

    There are MANY business models that require post-shipment order activity.
    Not everything is “gimme money, we’ll mail you crap’.

    These include (there are many more):
    1. B2B with payment after-the-fact (eg. invoicing net 30).
    2. Post-shipment installation support (here’s your stuff – we’ll call you).
    3. Post-shipment upsells.

    All of them require status OTHER than “completed” after all shipment(s) are made. Some of them require multiple order statuses between shipped and complete – but that’s not your problem, and is handled by other plugins and business activities.

    The problem is that you have hard-coded ‘complete’ because of your narrow view of how people use WooCommerce.

    All that’s needed to totally solve this issue is to NOT trigger all the actions that setting status=complete does. This involves adding one option and using it in place of the hard-coded ‘complete’ constant in 2-3 places in your code. The option should use a drop-down list of values populated from the wc_get_order_statuses() function call. Obviously the default value of the option would be ‘complete’.

    Plugin Author Zorem

    (@zorem)

    Hi @simonkane we did not hard-coded anything, we use the Completed order status from WooCommerce, this status means that the order is fulfilled and we add the tracking info to this order status. This is the reason we allow to change the order status to Completed or partially Shipped.

    You can create any other custom orders flow and custom order statuses and you can add the tracking info to these custom statuses from the AST settings but you will need to add tracking and then change the order status for the order to the custom status.

    You can see this example we explain how to create advanced orders flow in WooCommerce

    for these you can use the Delivered order status:
    Post-shipment installation support (here’s your stuff – we’ll call you).
    Post-shipment upsells.
    for the “B2B with payment after-the-fact (eg. invoicing net 30).” – this is still means that the order is Shipped..

    Thanks.

    • This reply was modified 5 years, 9 months ago by Zorem.

    It appears that you do not know what “hard-coded” means.
    THIS is ‘hard-coded’ (and likely not all occurrences of it in the plugin):
    class-wc-advanced-shipment-tracking.php lines 582, 637, 999, 1096:
    $order->update_status(‘completed’);

    You are assuming that “no matter what” the order should be marked as ‘completed’ if all items have been shipped. That is extremely presumptuous on your part as I outlined in my previous reply. ‘completed’ is defined in Woo as “no further actions need to be done for this order”. I’m not sure, but it seems to me that this actually conflicts with your own “Delivered” status that I think is returned by TrackShip if in use.

    Something similar to the following needs to be done:

    Add this after line 297 (and supporting code in admin and maybe elsewhere):
    $wc_ast_status_fully_shipped = get_option(‘wc_ast_status_fully_shipped’);

    and change the lines noted above to be:
    $order->update_status($wc_ast_status_fully_shipped);

    A typical user-created custom status for the above value would be ‘fully-shipped’,
    thereby allowing the site’s applicable business rules to be executed.

    Of course, this may not be 100% correct, but a programmer will understand
    the issue and what needs to be done.

    Plugin Author Zorem

    (@zorem)

    Hi, WooCommerce says about the completed status:

    Order fulfilled and complete – requires no further action.

    You dropped the word fulfilled and this means that the order was shipped… WooCommerce does not have a Shipped order status, we allow our users just to rename the label if the WooCommerce built in status to shipped and we allow to change the completed order status label (only) to Shipped.

    This is how it works, if you need Custom workflow you can create one but this works for 30K+ users and maybe you should think again about your orders flow.

    Thanks.

    WooCommerce ALSO does not have “delivered” or “Partially Shipped” order statuses – but you add THOSE.

    [ad hominem attack removed]

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Custom status after addiing Tracking No’ is closed to new replies.