Fix security check on email template preview page.
The nonce generated on the previous page was not being verified properly due to mismatched brackets (the second argument to wp_verify_nonce was not being passed).
This commit is contained in:
parent
14241b3f19
commit
60148d7f8f
|
@ -204,7 +204,7 @@ class WC_Admin {
|
|||
public function preview_emails() {
|
||||
|
||||
if ( isset( $_GET['preview_woocommerce_mail'] ) ) {
|
||||
if ( ! ( isset( $_REQUEST['_wpnonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_REQUEST['_wpnonce'], 'preview-mail' ) ) ) ) ) {
|
||||
if ( ! ( isset( $_REQUEST['_wpnonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_REQUEST['_wpnonce'] ) ), 'preview-mail' ) ) ) {
|
||||
die( 'Security check' );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue