Sorting Woocommerce products by category and attributes

Hi @ColinTravis you can use following function in functions.php :

/**
* Defines the criteria for sorting with options defined in the method below
*/

add_filter('woocommerce_get_catalog_ordering_args', 'custom_woocommerce_get_catalog_ordering_args');

function custom_woocommerce_get_catalog_ordering_args( $args ) {
    global $wp_query;
        // Changed the $_SESSION to $_GET
    if (isset($_GET['orderby'])) {
       // switch ($_GET['orderby']) :
           // case 'pa_pub-year' :
                $args['order'] = 'ASC';
                //$args['meta_key'] = 'pa_pub-year';
                $args['orderby'] = 'title';
           // break;
        //endswitch;
    }
    return $args;
}