We use box numbers because of the prefix we need to include in our order numbers for sending off deliveries.
order_number translates to
MEYS_HD_138776
The code above made it subtract a number off the order number to
MEYS_HD_138775
I’m just after the dash 1 at the end of the order number
MEYS_HD_138776-1
I’m using the following.
$value = $order->get_order_number() - 1;
And in the field it’s only showing -1.
With the order id when I use get_id it doesn’t have the -1 either, however I need the full order number not just the id. Still can’t seem to get it to work.