| @@ -3,9 +3,9 @@ | ||
| 3 | 3 | * Error Tracking |
| 4 | 4 | * |
| 5 | 5 | * @package Give |
| 6 | 6 | * @subpackage Functions/Errors |
| 7 | - * @copyright Copyright (c) 2016, WordImpress | |
| 7 | + * @copyright Copyright (c) 2016, GiveWP | |
| 8 | 8 | * @license https://opensource.org/licenses/gpl-license GNU Public License |
| 9 | 9 | * @since 1.0 |
| 10 | 10 | */ |
| 11 | 11 | |
| @@ -47,9 +47,9 @@ | ||
| 47 | 47 | if ( ! $errors ) { |
| 48 | 48 | $errors = array(); |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | - if( is_array( $notice_args ) && ! empty( $notice_args ) ) { | |
| 51 | + if ( is_array( $notice_args ) && ! empty( $notice_args ) ) { | |
| 52 | 52 | $errors[ $error_id ] = array( |
| 53 | 53 | 'message' => $error_message, |
| 54 | 54 | 'notice_args' => $notice_args, |
| 55 | 55 | ); |
| @@ -126,7 +126,8 @@ | ||
| 126 | 126 | * @return void |
| 127 | 127 | */ |
| 128 | 128 | function give_die( $message = '', $title = '', $status = 400 ) { |
| 129 | 129 | add_filter( 'wp_die_ajax_handler', '_give_die_handler', 10, 3 ); |
| 130 | + add_filter( 'wp_die_json_handler', '_give_die_handler', 10, 3 ); | |
| 130 | 131 | add_filter( 'wp_die_handler', '_give_die_handler', 10, 3 ); |
| 131 | 132 | wp_die( $message, $title, array( 'response' => $status ) ); |
| 132 | 133 | } |