You cannot get your orderid, first you need to assign orderid
then check get_total as shown in below code:
global $wp;
global $woocommerce;
$order_id = 11;
$order = new WC_Order( $order_id );
$total = $order->get_total();
echo $total;
Related Posts:
- WooCommerce – Customer Order History Pagination
- WooCommerce: Add Payment Gateway Field to Webhooks [closed]
- Limiting woocommerce line_total decimal length
- Automatically remove a canceled order in Woocommerce
- how to fix error “called incorrectly, should not be accessed directly”?
- How can I change the background color of divs dynamically (depending on an order-status in woocommerce)?
- How to override WooCommerce Order Item Meta with data from Cart?
- wp_query beginner
- Add Woocommerce Customers link to custom admin menu
- using custom pages for myaccount in woocommerce
- How to correctly add Javascript in functions.php
- How to remove “out of stock” variation options from size dropdown in woocommerce?
- Woocommerce: How to override core functions in functions.php?
- Get WooCommerce shipping methods programmatically
- Add a custom text field to WooCommerce admin product data “Variations”
- Translating add to cart woocommerce button [closed]
- Add attribute / custom attribute to product in woocommerce
- Listing and displaying WooCommerce Shipping Zones in the frontend? [closed]
- Help with some php math in WordPress
- How do I display a user’s previous orders as a select box option on a product?
- combine Code 1 with Code 2
- Adding nofollow to a PHP generated Nav
- Automated Cart Update With Alert Box Each Time
- Two Different Links for Same Product – WooCommerce [closed]
- WooCommerce/WordPress: how hide entire table form after submit (Admin Dashboard)?
- Show prices with tax in Woocommerce Mini Cart [closed]
- Problem with custom plugin using AJAX to pull info from php file
- Reload part of checkout on changed shipping method
- How to get all shipping rates and costs without session in woocommerce?
- Display a specific category of products in shop page and disable code for specific actions
- Woocommerce related product text
- Is it possible to intercept all ajax requests and get the parameters and the returns?
- How to make my custom widget appear within WordPress widgets? Plugin development
- Function works when I don’t login to WordPress but when I login then it doesn’t work
- How to auto fetch customer details in Woocommerce in checkout page
- How to make products with no cost in WooCommerce
- Incorrect amount of posts returned when filtering related Woo products by custom taxonomy
- WordPress admin is incredibly slow [closed]
- AJAX wp_insert_user WORKS but responds with “The site is not enabled”
- Can a plugin redirect product page based on IF condition?
- Remove page title in product page using a function
- woocommerce specific quantities for product
- woocommerce related product title length
- WordPress site with embedded menu – gives You don’t have permission to access /wp-content/themes/xxx/taxonomy-redirect.php on this server
- Woocommerce custom Plugin in wordpress [closed]
- How to separate product payment and shipping payment in WooCommerce checkout? [closed]
- Output product category link from WP_Query
- How to get woocommerce orders with get_posts method in a shortcode
- Variation prices breakdown only for single product page
- Woocommerce disable order item link (backend) [closed]
- Set all WooCommerce Products to Simple, Virtual & Downloadable
- Fatal error login WordPress [duplicate]
- Undefined array key 0 wp-includes/capabilities.php on line 76
- How do I know if the user is a customer?
- Combine change Email WordPress and woocommerce emails template
- I want to fusion the product columns in email table order
- WooCommerce is_product_category() not working
- Best way to use variables in multiple functions?
- Display all categories including sub categories under a list ul
- How do I programmatically add ‘reviews_allowed’ to WooCommerce product?
- Adding new divs with custom classes to products on WooCommerce shop page [closed]
- Get product price in a different currency using WooCommerce Currency Switcher
- Discount in the specific product title using keyword ( Woocoommerce )
- Adding product permalink on admin order page throwing error
- How to disable sub menu items from being created?
- Access to “My Site” is missing from the admin bar
- How to get total gross revenue for current month in the woocommerce dashboard status widget
- Add custom attribute to product’s HTML to woocommerce cart page
- Change WooCommerce template for PDF – access to custom field
- How can i style “echo apply_filters”
- Get all woocommerce product names with price and show using core php
- Add custom ID attribute to all woocommerce products on archive pages
- How to properly create multiple conditions to redirect users roles to different pages
- How can i put php code on the wordpress page?
- Display specific main Sub Nav on Woocommerce product pages
- How to detect if a revision was made by woocommerce or wordpress?
- Need Quick Help With Product Category Page
- How do I prevent a folder from reappearing in my home directory?
- admin uploads pre_get_posts not working as expected
- jQuery doesn’t work in my php snippet
- Use WP_Query Data In Cookie
- Styling admin page rows in order of importance (checkboxes)
- How to add custom checkout field in user details mail template
- How to set up and use a custom upload directory for post type ‘product’
- Add specific phrase after every product title including the discounted price? [closed]
- Display Sale Price Before Regular Price (WooCommerce)
- Setting WooCommerce currency programmatically
- Exclude specific product tags from related products in WooCommerce 3+ [closed]
- WooCommerce Orders pagination
- How do I change the Go To Categories link in the term_updated_messages
- WooCommerce – Show ‘Sales’ badge on variable products where only some variations have sales price [closed]
- How to create a container in php then customise it in CSS
- Show button in header when product custom field is not empty
- WordPress 6.1.1 UTF8 Slug Limit Increase
- How to change wp-admin and wp-login urls
- Woocommerce Convert existing order to the cart
- How to change shipping method title based on cart amount?
- How to add SKU and remove product title from WooCommerce url?
- Product Search in search.php
- Restricting access to a file for everyone except logged in users