• Resolved tomzorz

    (@tomzorz)


    Hi, we’re using your premium plugin and also the customer-form shortcode to let customers create their orders.
    We internally use a sequential order number syntax of OR-19001, OR-19002 and so on. We would like the orders created by customers to follow this syntax rule as well. Is it possible?

    I’ve read in other support threads that it’s possible by editing the plugin core files … how would I implement this there?

    Side note: perhaps it’s a good idea to implement a filter or hook functionality for this?

    Thanks in advance!

Viewing 1 replies (of 1 total)
  • Plugin Contributor etoilewebdesign

    (@etoilewebdesign)

    Hi tom,

    You should be able to modify the code to get it how you want. We’ve never tried to do it like that, so I wouldn’t be able to provide you with exact code. However, I can tell you that the file that contains the code that generates that order number is the “Prepare_Data_For_Insertion.php file” in the “Functions” folder.

    The line (111) that generates the order number is:

    $Order_Number = __('Order', 'order-tracking') . EWD_OTP_RandomString(5);
    

    And it makes use of the EWD_OTP_RandomString($CharLength = 10) function from line 753

Viewing 1 replies (of 1 total)

The topic ‘Make customer created order numbers sequential — hook or filter?’ is closed to new replies.