Title: Problem with add_error() function in Woocommerce 2.3
Last modified: August 22, 2016

---

# Problem with add_error() function in Woocommerce 2.3

 *  Resolved [Silverwings](https://wordpress.org/support/users/silverwings/)
 * (@silverwings)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/problem-with-add_error-function-in-woocommerce-23/)
 * Hello,
    i have this problem
 * Fatal error: Call to undefined method WooCommerce::add_error()
 * when in response gateways i write:
 * $woocommerce->add_error(__(‘Transiction error: ‘, ‘woothemes’) .$posted[‘responseText’]);
   
   wp_redirect( $woocommerce->cart->get_checkout_url());
 * Thanks
 * [https://wordpress.org/plugins/woocommerce/](https://wordpress.org/plugins/woocommerce/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Contributor [Mike Jolley](https://wordpress.org/support/users/mikejolley/)
 * (@mikejolley)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/problem-with-add_error-function-in-woocommerce-23/#post-5803385)
 * add_error was deprecated about 12 months ago. Use wc_add_notice [http://docs.woothemes.com/wc-apidocs/function-wc_add_notice.html](http://docs.woothemes.com/wc-apidocs/function-wc_add_notice.html)
 *  Thread Starter [Silverwings](https://wordpress.org/support/users/silverwings/)
 * (@silverwings)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/problem-with-add_error-function-in-woocommerce-23/#post-5803386)
 * Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Problem with add_error() function in Woocommerce 2.3’ is closed to new
replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3640790)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Silverwings](https://wordpress.org/support/users/silverwings/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/problem-with-add_error-function-in-woocommerce-23/#post-5803386)
 * Status: resolved