diff --git a/templates/single-product/add-to-cart/variable.php b/templates/single-product/add-to-cart/variable.php index 5e923789063..fccc5b74342 100644 --- a/templates/single-product/add-to-cart/variable.php +++ b/templates/single-product/add-to-cart/variable.php @@ -41,7 +41,7 @@ global $woocommerce, $product, $post; switch ( $orderby ) { case 'name' : - $args = array( 'orderby' => 'name', 'order' => 'ASC', 'menu_order' => false ); + $terms = get_terms( sanitize_title($name), array('menu_order' => 'ASC', 'hide_empty' => false) ); break; case 'id' : $args = array( 'orderby' => 'id', 'order' => 'ASC', 'menu_order' => false );