verify_nonce should check if variable isset(). Closes #4704
This commit is contained in:
parent
8362bfe1b7
commit
5a79e2a809
|
@ -696,6 +696,9 @@ final class WooCommerce {
|
||||||
*/
|
*/
|
||||||
public function verify_nonce( $action, $method = '_POST', $error_message = false ) {
|
public function verify_nonce( $action, $method = '_POST', $error_message = false ) {
|
||||||
_deprecated_function( 'Woocommerce->verify_nonce', '2.1', 'wp_verify_nonce' );
|
_deprecated_function( 'Woocommerce->verify_nonce', '2.1', 'wp_verify_nonce' );
|
||||||
|
if ( ! isset( $method[ '_wpnonce' ] ) ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return wp_verify_nonce( $method[ '_wpnonce' ], 'woocommerce-' . $action );
|
return wp_verify_nonce( $method[ '_wpnonce' ], 'woocommerce-' . $action );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue