You could call either of the following functions in your email template:
<?php echo WC()->cart->get_cart_contents_count(); ?>
OR
<?php echo(count(WC()->cart->get_cart())); ?>
Related Posts:
- Redirect to another page using contact form 7? [closed]
- WP WC CLI – WooCommerce setup store with wp-cli [closed]
- Update Multiple Post Meta for the Same Post In One call?
- Function to activate WordPress theme inside a plugin
- Which functions in theme or plugin load first
- How to make my plugin theme-independent?
- How to load a new template page according to a particular URL?
- Autoload via composer in plugin interference
- Custom Shipping method not showing in checkout
- Workflow and best practice for documentation [closed]
- Create or Update thousands of woocommerce products via PHP
- Is it possible to set up multistore in Woocommerce? [closed]
- How to integrate plugin in WordPress theme
- How to remove the woocommerce_checkout_process action hook in woocommerce if particular project in cart [closed]
- Woocommerce plugin for minimum order and add-to-card-step
- How to get current post user id
- Display post lists in 2nd paragraph
- How to stop activating a plugin and show admin notice when dependent plugins minimum version is not met
- woocommerce payment gateway callback not firing [closed]
- How to modify WCMP Rest API response?
- Woocommerce dependent plugin
- New databes tables with – WooCommerce – for developers [closed]
- Change commission_status paid when withdraw_status vendor is completed
- custom payment gateway in woocommerce failed to connect to remote api server
- Woocommerce Minimum Price for a Composite Product to add in cart
- How can I insert thousands of Woocommerce products by batch with PHP? [closed]
- How do I combine a theme with a plugin
- how to force tag page layout to use same as search layout?
- How to write “alt” tag in image for wordpress code?
- Get Every Key & Value from Array then Display All in New Line
- Shortcode Attributes to Return different $_POST
- Add_rewrite_endpoint doesn’t work with post name permalink structure
- Add a “View all” button on WooCommerce product archives pages
- Cross Sells are not being shown in Cart Page. Please Help!
- Error with get_price (and others) in self-written plugin to show price
- Search users with custom meta data
- WordPress custom plugin that uses woocommerce enabled payment gateway for payment [closed]
- Disable variations on woo commerce if out of stock
- How to add category and subcategory in WordPress custom code?
- Don’t load the theme for a page FROM a plugin EDITED
- Extending a theme: build new features as plugin or core modules?
- Remember the Meta Value With Radio Buttons
- WordPress plugin with its own “site”/theme
- Yoast SEO Plug In and my Theme duplicating code. Need some feedback on what to do? [closed]
- Seperate plugin and theme files
- WooCommerce – I want to add functionality of one plugin to another plugin — best approach?
- How to Get Category Name When Export Products
- woocommerce remove coupon link does not work
- wp_query ‘s’ parameter does not work with WC_AJAX
- Grouping imported products and showing variations based on selected product
- How to override any plugin file in the child theme
- Remove Zero Money From Previews Order woocommerce
- submit two file input fields in the same form
- How would I Redirect an existing WooCommerce customer to a specific url after Checkout
- Make downloadable ebook read online without download option
- How can I find related learndash course id from woocommerce product object?
- Rename a folder via HTML POST request
- Woocommerce convert simple products to variations
- How to make WooCommerce multiple filter with custom meta fields
- How to create a plugin with automatic update?
- category page multiple products add to cart any plugin available for woocommerce
- Getting all woocommerce products from REST API call in plugin
- “Enable Media Replace” plugin does not update serialized object in WPMeta
- Change Woo Custom Endpoint Titles from a Plugin
- Use Case: Multiple Shipping Methods per Order
- In woocommerce, is there any way to empty wordpress default mini cart when order placed?
- Get a list of Product Categories inside a loop
- Remove action added in plugin class from theme
- wc_get_product_terms() throws “Notice: Undefined offset: 0”
- Woocommerce list variations that are added already to cart in Single Product
- Not displaying Woocommerce product page in lightbox
- Can you develop themes and plugins while using the hosting services BlueHost? [closed]
- Change pricing in Woocommerce based on Category and Product [closed]
- Adding/ Removing actions for plugins
- how to add custom css at top above all css file for specific url
- Unable to sync woocommerce variations
- Can anyone tell me why I can’t edit a plugin when it is installed without having to re-install?
- Breadcrumb is not generating the correct post page url
- Unable to show 4 products in a row
- Site is setup statically – how to make it content managable?
- How can I make a website with dynamic features with wordpress?
- WooCommerce custom query and paging: Not Found error
- How to create post comparison in wordpress
- How to add image for custom taxonomy
- Integrating WordPress Content into a jQuery Slider
- How to escape html code?
- Predefine Product Variations for specific custom product type [closed]
- Create Custom Coupon Type
- How to create a “plugin” or “block” that can manipulate WordPress DOM in frontend?
- manage_{taxonomy}_custom_column not working
- Template selector for woocommerce product
- add_meta_box showing blank screen in my page
- How to make content as required in custom post type?
- What are Seeds? [closed]
- How to use `$order->get_discount_total()`, avoiding defoult WC decimal rounding?
- A multi-section WordPress store [closed]
- Frontend Enqueued Files in the Backend
- How to create new title and its description inside a section in WP Customizer?
- Custom Search Function in WordPress Returns No Results
- Gutenberg Blocks and Elementor