| @@ -30,10 +30,12 @@ | ||
| 30 | 30 | update_option( 'yaymail_next_recommendation_suggest_addons_notice_time', time() + 60 * 60 * 24 * 60 ); |
| 31 | 31 | wp_send_json_success(); |
| 32 | 32 | } catch ( \Error $error ) { |
| 33 | 33 | yaymail_get_logger( $error ); |
| 34 | + wp_send_json_error( [ 'mess' => $error->getMessage() ] ); | |
| 34 | 35 | } catch ( \Exception $exception ) { |
| 35 | 36 | yaymail_get_logger( $exception ); |
| 37 | + wp_send_json_error( [ 'mess' => $exception->getMessage() ] ); | |
| 36 | 38 | } |
| 37 | 39 | } |
| 38 | 40 | |
| 39 | 41 | public function yaymail_dismiss_upgrade_notice() { |
| @@ -46,9 +48,11 @@ | ||
| 46 | 48 | update_option( 'yaymail_next_recommendation_upgrade_notice_time', time() + 60 * 60 * 24 * 60 ); |
| 47 | 49 | wp_send_json_success(); |
| 48 | 50 | } catch ( \Error $error ) { |
| 49 | 51 | yaymail_get_logger( $error ); |
| 52 | + wp_send_json_error( [ 'mess' => $error->getMessage() ] ); | |
| 50 | 53 | } catch ( \Exception $exception ) { |
| 51 | 54 | yaymail_get_logger( $exception ); |
| 55 | + wp_send_json_error( [ 'mess' => $exception->getMessage() ] ); | |
| 52 | 56 | } |
| 53 | 57 | } |
| 54 | 58 | } |