gpt4 book ai didi

wordpress - 如何更改 Woocommerce "Sort By"文本?

转载 作者:行者123 更新时间:2023-12-03 18:38:25 25 4
gpt4 key购买 nike

如何在最新版本的 Woocommerce 中更改此文本 -

最佳答案

我希望有更好的方法来解决您的问题。只需复制并粘贴您的functions.php 主题。好的

add_filter('woocommerce_catalog_orderby', 'wc_customize_product_sorting');

function wc_customize_product_sorting($sorting_options){
$sorting_options = array(
'menu_order' => __( 'Sorting', 'woocommerce' ),
'popularity' => __( 'Sort by popularity', 'woocommerce' ),
'rating' => __( 'Sort by average rating', 'woocommerce' ),
'date' => __( 'Sort by newness', 'woocommerce' ),
'price' => __( 'Sort by price: low to high', 'woocommerce' ),
'price-desc' => __( 'Sort by price: high to low', 'woocommerce' ),
);

return $sorting_options;
}

关于wordpress - 如何更改 Woocommerce "Sort By"文本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37445423/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com