Title: Error message: Uncaught Error: Call to undefined function wc_empty_cart()
Last modified: September 16, 2022

---

# Error message: Uncaught Error: Call to undefined function wc_empty_cart()

 *  [samimeadad](https://wordpress.org/support/users/samimeadad/)
 * (@samimeadad)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/error-message-uncaught-error-call-to-undefined-function-wc_empty_cart/)
 * Hello,
 * I am running this Learning Management Site on Siteground web hosting. Today, 
   I got this mail that my site is encountering a technical problem. The related
   information are as follows –
    . WordPress version 6.0.2 Active theme: WPLMS Blank
   ChildTheme (version 1.0) Current plugin: WooCommerce (version 6.7.0) PHP version
   7.4.30 . . .
 *     ```
       Error Details
       =============
       An error of type E_ERROR was caused in line 372 of the file /home/customer/www/learndrive.org/public_html/wp-content/plugins/woocommerce/includes/class-wc-session-handler.php. Error message: Uncaught Error: Call to undefined function wc_empty_cart() in /home/customer/www/learndrive.org/public_html/wp-content/plugins/woocommerce/includes/class-wc-session-handler.php:372
       Stack trace:
       #0 /home/customer/www/learndrive.org/public_html/wp-content/plugins/woocommerce/includes/class-wc-session-handler.php(363): WC_Session_Handler->forget_session()
       #1 /home/customer/www/learndrive.org/public_html/wp-content/plugins/woocommerce/includes/class-wc-session-handler.php(99): WC_Session_Handler->destroy_session()
       #2 /home/customer/www/learndrive.org/public_html/wp-content/plugins/woocommerce/includes/class-wc-session-handler.php(71): WC_Session_Handler->init_session_cookie()
       #3 /home/customer/www/learndrive.org/public_html/wp-content/plugins/woocommerce/includes/class-woocommerce.php(861): WC_Session_Handler->init()
       #4 /home/customer/www/learndrive.org/public_html/wp-content/plugins/woocommerce-payments/includes/class-wc-payments-fraud-service.php(131): WooCommerce->initialize_session()
       #5 /home/customer/www/lea
       ```
   
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-message-uncaught-error-call-to-undefined-function-wc_empty_cart%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  [Liew Cheon-Fong](https://wordpress.org/support/users/lcf/)
 * (@lcf)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/error-message-uncaught-error-call-to-undefined-function-wc_empty_cart/#post-16017227)
 * maybe you need to update WooCommerce to the latest version.

Viewing 1 replies (of 1 total)

The topic ‘Error message: Uncaught Error: Call to undefined function wc_empty_cart()’
is closed to new replies.

## Tags

 * [uncaught error](https://wordpress.org/support/topic-tag/uncaught-error/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Liew Cheon-Fong](https://wordpress.org/support/users/lcf/)
 * Last activity: [3 years, 9 months ago](https://wordpress.org/support/topic/error-message-uncaught-error-call-to-undefined-function-wc_empty_cart/#post-16017227)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
