← All changes
|
includes/admin/emails/class-email-notifications.php
+5
-0
4.16.1
→
4.17.0
View file →
| @@ -313,13 +313,18 @@ | ||
| 313 | 313 | /** |
| 314 | 314 | * Add header to donation receipt email preview |
| 315 | 315 | * |
| 316 | 316 | * @since 2.0 |
| 317 | + * @since 4.16.6 Re-check capability/nonce here, since this callback is also reachable via a direct action dispatch that bypasses the check normally done in preview_email(). | |
| 317 | 318 | * @access public |
| 318 | 319 | * |
| 319 | 320 | * @param Give_Email_Notification $email |
| 320 | 321 | */ |
| 321 | 322 | public function email_preview_header( $email ) { |
| 323 | + if ( ! Give_Email_Notification_Util::can_preview_email() ) { | |
| 324 | + return; | |
| 325 | + } | |
| 326 | + | |
| 322 | 327 | /** |
| 323 | 328 | * Filter the all email preview headers. |
| 324 | 329 | * |
| 325 | 330 | * @since 2.0 |