Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

filters. Closes #1108.

  • Loading branch information...
commit 809175b41c751e6c238ee38e3b5483a1a690a789 1 parent f62d0ef
@mikejolley mikejolley authored
Showing with 3 additions and 2 deletions.
  1. +1 −0  readme.txt
  2. +2 −2 woocommerce.php
View
1  readme.txt
@@ -164,6 +164,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
* Tweak - Changed menu position to avoid conflicts
* Tweak - country_multiselect_options returns allowed countries only
* Tweak - Add order - country should not set itself
+* Tweak - Add error/message filters
* Fix - Strange error where detecting the page (is_page etc) would break the canonical redirect in some instances when hooked into 'wp'. Used the later get_header hook instead.
* Fix - fix for https://bugs.php.net/bug.php?id=61166 (thanks Max Rice)
* Fix - postcode validation when country is different for shipping vs billing
View
4 woocommerce.php
@@ -1147,12 +1147,12 @@ function load_messages() {
/**
* Add an error
*/
- function add_error( $error ) { $this->errors[] = $error; }
+ function add_error( $error ) { $this->errors[] = apply_filters( 'woocommerce_add_error', $error ); }
/**
* Add a message
*/
- function add_message( $message ) { $this->messages[] = $message; }
+ function add_message( $message ) { $this->messages[] = apply_filters( 'woocommerce_add_message', $message ); }
/** Clear messages and errors from the session data */
function clear_messages() {
Please sign in to comment.
Something went wrong with that request. Please try again.