Merge pull request #7255 from tamarazuk/reviews-meta-box-patch
[2.3] Reviews meta box: avoid undefined index notice
This commit is contained in:
commit
ae316fd63b
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue