Current method:
The current way of accomplishing this is by using this function:
$order->get_id();
That should return the order id without “#”.
Old method:
In older versions of WooCommerce, you may need to access it as a property instead:
echo $order->id;
More Related Contents:
- Sql query to download order report in woocommerce
- Get cart item name, quantity all details woocommerce
- Woocommerce checkout page internal server error
- WooCommerce: Add input field to every item in cart
- WooCommerce show custom column
- Woocommerce get variation product price
- How to get WooCommerce order details
- PHP Warning: POST Content-Length of 8978294 bytes exceeds the limit of 8388608 bytes in Unknown on line 0
- How to add custom stock status to products in WooCommerce 4+
- Get in WooCommerce cart the product ID of a cart item
- Update fee dynamically based on radio buttons in Woocommerce checkout
- Allow re-sending New Order Notification in WooCommerce 5+
- WooCommerce: Add product to cart with price override?
- Create programmatically a variable product and two new attributes in WooCommerce
- How can I get customer details from an order in WooCommerce?
- How to include pagination in a WordPress Custom Post Type Query
- WooCommerce : Add custom Metabox to admin order page
- Programmatically creating new order in Woocommerce
- Hide variation info from cart item title in WooCommerce 3+
- Get coupon data from WooCommerce orders
- Show stock status next to each attribute value in WooCommerce variable products
- Show hide payment methods based on selected shipping method in Woocommerce
- Get custom product attributes in Woocommerce
- Change sender name and email address for specific WooCommerce email notifications
- Why is WordPress placing “text/rocketscript” instead of “text/javascript” when using wp_register_script()?
- Set custom shipping rates programmatically in Woocommerce 3
- Add a custom column with meta data to My Account Orders table in Woocommerce 3+
- Replace add to cart button with a read more linked to product page on shop pages in WooCommerce 3
- How to fetch a wordpress admin page using google apps script?
- WordPress session management