Merge pull request #7255 from tamarazuk/reviews-meta-box-patch

[2.3] Reviews meta box: avoid undefined index notice
This commit is contained in:
Mike Jolley 2015-01-31 21:09:22 +00:00
commit ae316fd63b
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ class WC_Meta_Box_Order_Reviews {
*/
public static function save( $location, $comment_id ) {
// Not allowed, return regular value without updating meta
if ( ! wp_verify_nonce( $_POST['woocommerce_meta_nonce'], 'woocommerce_save_data' ) && ! isset( $_POST['rating'] ) ) {
if ( empty( $_POST['woocommerce_meta_nonce'] ) || ( ! wp_verify_nonce( $_POST['woocommerce_meta_nonce'], 'woocommerce_save_data' ) && ! isset( $_POST['rating'] ) ) ) {
return $location;
}