Merge pull request #23356 from leonaves/patch-1
Fix security check on email template preview page.
This commit is contained in:
commit
e64e927aab
|
@ -204,7 +204,7 @@ class WC_Admin {
|
||||||
public function preview_emails() {
|
public function preview_emails() {
|
||||||
|
|
||||||
if ( isset( $_GET['preview_woocommerce_mail'] ) ) {
|
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' );
|
die( 'Security check' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue