• 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 2 months, 1 week ago by jimmykwk.
Viewing 3 replies - 1 through 3 (of 3 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 2 weeks, 4 days 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.

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