← All changes
|
includes/abilities/settings/class-send-email-report-test.php
+4
-2
2.2.0
→
2.9.0
View file →
| @@ -75,9 +75,9 @@ | ||
| 75 | 75 | 'success' => [ 'type' => 'boolean' ], |
| 76 | 76 | 'message' => [ 'type' => 'string' ], |
| 77 | 77 | 'result' => [ |
| 78 | 78 | 'type' => 'object', |
| 79 | - 'description' => __( 'Raw generator result (send status, error, or skip reason).', 'thinkrank' ), | |
| 79 | + 'description' => __( 'Raw generator result: send status, error or skip reason, and not_connected (true when the test went out as the "connect Search Console" email because Google Search Console is not connected).', 'thinkrank' ), | |
| 80 | 80 | 'additionalProperties' => true, |
| 81 | 81 | ], |
| 82 | 82 | ], |
| 83 | 83 | ]; |
| @@ -119,9 +119,11 @@ | ||
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | return [ |
| 122 | 122 | 'success' => true, |
| 123 | - 'message' => __( 'Test email report sent.', 'thinkrank' ), | |
| 123 | + 'message' => ! empty( $result['not_connected'] ) | |
| 124 | + ? __( 'Test email sent. Google Search Console is not connected, so it explains how to connect rather than showing a report; scheduled reports are paused until then.', 'thinkrank' ) | |
| 125 | + : __( 'Test email report sent.', 'thinkrank' ), | |
| 124 | 126 | 'result' => $result, |
| 125 | 127 | ]; |
| 126 | 128 | } |
| 127 | 129 | |