returned data early if nonce checking is failed

This commit is contained in:
Mohammed Saimon 2018-04-07 15:13:35 +06:00
parent 6f36133ed5
commit 6d973b98b6
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ class WC_Meta_Box_Product_Reviews {
public static function save( $data ) {
// Not allowed, return regular value without updating meta
if ( ! wp_verify_nonce( $_POST['woocommerce_meta_nonce'], 'woocommerce_save_data' ) && ! isset( $_POST['rating'] ) ) {
return;
return $data;
}
$comment_id = $data['comment_ID'];