I fixed the issue by adding the below in my functions.php:
add_filter( 'woocommerce_add_to_cart_fragments', 'your_custom_functions', 10, 1 );
function your_custom_functions( $fragments ) {
$fragments['.your_cart_class'] = '' . WC()->cart->get_cart_contents_count() . ' Items';
return $fragments;
}
Related Posts:
- WooCommerce add_to_cart() with custom price [closed]
- wc_get_product in a none woocommerce page
- WooCommerce add_to_cart url not working [closed]
- woocommerce_package_rates not fired everytime
- Problems adding in-store product managers
- Javascript / Ajax Error After Migrating To New Domain Name
- Programatically Remove Item from Cart Not Working – Needs Page Refresh
- In WooCommerce product archive, how can you also set the quantity to be added to cart by typing, instead of just by using +/-?
- WooCommerce update_shipping_method ajax call wipes shipping method set on non-checkout page [closed]
- CF7 Ajax isn’t working when called inside WooCommerce “woocommerce_before_add_to_cart_button” hook [closed]
- ajax request in wordpress
- WooCommerce event works in jQuery but not in JavaScript
- Trying to run Javascript on AJAX call
- WooCommerce variable product can not add to cart using ajax after updating latest version of WooCommerce
- Running JavaScript after using WooCommerce Filter Plugin
- call_user_func_array() expects parameter 1 to be a valid callback, class ‘WC_Rapyd’ does not have a method ‘install’
- Call product search from custom hook
- woocommerce deposit Form with AJAX and shortcode won’t update but add to previous output
- Woocommerce Variation product added twice to cart
- woocommerce REST api on the website’s front-end
- Woocommerce Multisite global search how to mod ajax function?
- Pass values to ajax
- Unable to call woocommerce hook in my custom php file
- Fragments to Update Cart Counter not working on homepage – Woocommerce
- Overriding Plugin function in your child theme
- Update / refresh mini cart, after custom AJAX add_to_cart event
- Can’t update WooCommerce payment method title
- Using category and its sub-categories products attributes as filter in products pages
- Removing Product from Woocommerce checkout page using Ajax
- add_filter not works in ajax
- SyntaxError: unterminated string literal – if WordPress Debug in wp-config is set to true
- How to add ajax loading icon after click add to cart button on woocommerce
- WordPress error
- Woocommerce ajax search can’t work on mobile
- WooCommerce: Can’t use wc_get_products for custom REST API endpoints
- How to remove an action within a class with extends
- How to disable Woocommerce password recovery and use the default WordPress password reset page?
- Display WooCommerce size product attribute on shop page
- How to remove_action inside class [duplicate]
- Redirect if current user is logged out and current page is /my-account
- woocommerce_before_calculate_totals in woocommerce 3.0
- Display a list subcategories under the main product category thumbnails?
- Unable to programmatically remove product from WooCommerce cart
- How to Change WooCommerce Variable product pricing by SKU or visible children id
- Is it possible to cache ?wc-ajax=get_variation
- Is WooCommerce updates for WordPress necessary? [closed]
- Get the cart details from the order id in woocommerce?
- Woocommerce Customs Endpoint
- Woocommerce add payment method outside of checkout and my account
- Changing the Woocommerce breadcrumb menu [closed]
- Position image widget in mega menu
- short description in shop page after title
- Allow WooCommerce existing customers to checkout without being logged in [closed]
- WP_Error on attribute + term insert
- change woocommerce product statut (draft ->publish // publish->draft) depends on the month [closed]
- How to add taxonomy term under the thumbnail on woocommerce product page
- How to overwrite price html in woocommerce single product page
- woocommerce breadcrumbs in theme [closed]
- Shipping methods in dropdown instead of radio buttons [closed]
- 600k of option_name “c_facebook_background_product_sync_job”
- Adding Buy Button to Blog Post (Woocommerce) [closed]
- Woocommerce get the Archive/Category slug of the current category page
- woocommerce_order_status_completed not working
- Synchronise Renewals on existing subscriptions [closed]
- Sort downloads by most recently purchased first in my account WooCommerce [closed]
- Hide shipping method in woocommerce if custom checkbox field is selected
- how to change add to cart button to call for price button in one of product variation?
- Submitting product attributes via Ninja Forms wordpress?
- apply_filter and add_filter conflict
- Migrating WordPress + WooCommerce from server to Local
- wp-cron and woocommerce subscriptions killing performance
- How to make wocommerce shop products same heigt
- Woocommerce product query not working in other WPML languages
- Woocommerce Ajax add to cart redirect to homepage
- How to merge 2 accounts with same email address after merge of 2 woocommerce databases
- WooCommerce REST API AJAX Auth – 401 response
- Get $order in wp_head
- Update WooCommerce stock status with SQL query if stock value is greater than 0
- Adding order details in woocommerce all booking dashboard
- woocommerce cart related issue cart not deleted
- Integration widget Mondial Relay Js
- Custom Registration Fields woocommerce
- Woocommerce variable products are being added to the card on the homepage (ajax)
- Duplicate post/product permalinks. (Link is temporary)
- How Do I Access Parameters Emitted by an Action?
- WooCommerce set specific currency on site shop
- Adding arguments to WooCommerce Product Loop using AJAX
- WooCommerce shop, my account, cart every page redirect to home page [closed]
- How to edit woocommerce checkout fields
- Restrict the shop_manager role to the WooCommerce Orders Page
- How to disable click thumbnail product on archives product [closed]
- Include customer details in woocommerce 3rd part plugin email
- how to add a page to a plugin?
- Unable to get product category
- How can i hide a specific class when cart subtotal is above a certain amount
- Update WooCommerce Short Description using SQL
- How do I fix this “Uncaught ReferenceError: woodmartThemeModule is not defined”?
- How can I solve WordPress error “Cannot load product_attributes” and “Cannot load product-reviews”?
- Product data field for Woo Commerce is blank?
- WP All Import – Set product product status with xpath