From 3d3b24e39c6677269d00a0eb202e529683c74cd7 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 26 Jul 2016 11:18:58 +0100 Subject: [PATCH] [2.6] Check taxonomy is set Closes #11526 --- includes/admin/class-wc-admin-taxonomies.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/includes/admin/class-wc-admin-taxonomies.php b/includes/admin/class-wc-admin-taxonomies.php index b8626f57a36..65eee936064 100644 --- a/includes/admin/class-wc-admin-taxonomies.php +++ b/includes/admin/class-wc-admin-taxonomies.php @@ -357,11 +357,9 @@ class WC_Admin_Taxonomies { * @return array */ public function disable_checked_ontop( $args ) { - - if ( 'product_cat' == $args['taxonomy'] ) { + if ( ! empty( $args['taxonomy'] ) && 'product_cat' === $args['taxonomy'] ) { $args['checked_ontop'] = false; } - return $args; } }