• Resolved jimmykwk

    (@jimmykwk)


    Hi,

    Thanks for the awesome plugin. Would like to check if there’s a way to show / generate sequential order number when I create Add Order from Admin Panel? Currently it still shows default WooCommerce order no, only when I hit create/ save the order, it will be replaced with the expected sequential order number.

    If you have a sample code/ hook that I can take reference, that’d be perfect. Thanks!

    • This topic was modified 5 months, 1 week ago by jimmykwk.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support WebToffee Support

    (@webtoffeesupport)

    Hi @jimmykwk,

    Thanks for reaching out.

    The plugin assigns sequential order numbers after the order is created. The plugin stores the last order number value in $wt_last_order_number = get_option('wt_last_order_number', 0); you may use this to meet your requirements.

    The function call stores the last generated order number. Therefore, if an order is placed on the site while an order is being created in the backend, the first created order will be assigned the next sequential order number. Thank you for your understanding.

    Hello, when the administrator manually creates a new order, where should I call this code so that the order numbers can be in order? Please teach me more carefully.

    $wt_last_order_number = get_option(‘wt_last_order_number’, 0);

    When I create a new order manually, the $order_number I get in the hook is not the order number but the post= id number. What should I do?

    • This reply was modified 3 months, 3 weeks ago by wei24.
    Plugin Support WebToffee Support

    (@webtoffeesupport)

    Hi @wei24,

    When an order is manually created in the WooCommerce admin dashboard, the plugin does not assign a sequential order number until the order is created, which is why you’re seeing the post_id instead of the sequential order number. You may place a test order from the admin dashboard to verify this behaviour.

    The $wt_last_order_number = get_option('wt_last_order_number', 0); was provided to the user to meet his specific requirements.

    Hello After manually creating an order in the background, the order number is sequential, but the new order reminder received by the administrator’s mailbox is not sequential, but post = id, How to solve this problem?

    Plugin Support WebToffee Support

    (@webtoffeesupport)

    Hi @wei24,

    We are unable to replicate the issue. The WooCommerce new order email correctly displays the sequential order number generated by the plugin.

    Could you kindly confirm if you are using any third-party plugin to send the order reminder email? If so, it’s possible that the third-party plugin is returning the post_id instead of our sequential number. Unfortunately, this cannot be addressed from our side because the plugin uses $order->get_order_number() to fetch and display sequential numbers, which is the intended workflow.

    We recommend reaching out to the third-party plugin and requesting them to use $order->get_order_number() instead of referencing $order->id or $order->get_id() when fetching order data.

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