Traducir «Short by newest» de la página de productos de Woocommerce



woocommerce sort by

-Para traducir esta opción que nos permite ordenar los productos por fecha,precio o popularidad debemos dirigirnos al archivo wp-contentpluginswoocommerceincludeswc-template-functions.php y modificar la siguiente línea:

function woocommerce_catalog_ordering() {
global $wp_query;

if ( 1 == $wp_query->found_posts || ! woocommerce_products_will_display() ) {
return;
}

$orderby = isset( $_GET['orderby'] ) ? wc_clean( $_GET['orderby'] ) : apply_filters( 'woocommerce_default_catalog_orderby', get_option( 'woocommerce_default_catalog_orderby' ) );
$show_default_orderby = 'menu_order' === apply_filters( 'woocommerce_default_catalog_orderby', get_option( 'woocommerce_default_catalog_orderby' ) );
$catalog_orderby_options = apply_filters( 'woocommerce_catalog_orderby', array(
'menu_order' => __( 'Default sorting', 'woocommerce' ),
'popularity' => __( 'Sort by popularity', 'woocommerce' ),
'rating' => __( 'Sort by average rating', 'woocommerce' ),
'date' => __( 'Ordenar por fecha', 'woocommerce' ),
'price' => __( 'Sort by price: low to high', 'woocommerce' ),
'price-desc' => __( 'Sort by price: high to low', 'woocommerce' )
) );