Hi,
Basically to get WooCommerce order number, you should call $order->get_order_number() function, however this will return full order number (with prefix etc.). You can then remove prefix by calling something like str_replace( 'yourprefix', '', $order->get_order_number() ).
In standard WooCommerce order numbers are order ids, so you can also access it by simply $order->id. This will return original order number, i.e. without Booster’s numbering and without prefix, suffix etc.
If you want to access Booster given order number without prefix etc., you can get it by accessing order meta, like this: get_post_meta( $order->id, '_wcj_order_number', true ).
Please let me know if this helped.
And if you like Booster, please leave us a rating.
Best regards,
Tom
-
This reply was modified 9 years, 3 months ago by
Algoritmika.
-
This reply was modified 9 years, 3 months ago by
Algoritmika.
-
This reply was modified 9 years, 3 months ago by
Algoritmika.
Wow, thank you for this quick and perfect reply.
Can you give me a source where I can find all the functions related to $order? (Like get_order_number() or other parameters like billing_adress, etc.)?
So I pruchased the Booster Plus Plugin and now I need to get the Order Number with the “Width”.
Like Order Number: 1
Order Width: 3
–> 001
Need to get ‘001’.
I couldn’t find the width in Get_post_meta($order->id);