Changing the 'Shipping' text in WooCommerce cart and checkout pages: [duplicate]

烂漫一生 提交于 2020-08-25 03:46:34

问题


I'm using WooCommerce with the Storefront theme and I'm trying to alter the word "Shipping" on the basket page with totals.

I found some advice here: https://kriesi.at/support/topic/change-shipping-text-to-delivery-on-checkoutcart/

However, they mention it might require custom work to do this.

Can anyone please advise?

Paul


回答1:


Add this hook in function.php

add_filter( 'woocommerce_shipping_package_name', 'custom_shipping_package_name' );
function custom_shipping_package_name( $name ) {
  return 'Your Text';
}



回答2:


Please add this code in functions.php

add_filter( 'woocommerce_shipping_package_name', 'custom_shipping_package_name' );
function custom_shipping_package_name( $name ) {
    return 'Delivery';
}



回答3:


Changing anything like that will require some custom code. There's a good tutorial here: https://apppresser.com/woocommerce-checkout-customization-guide/

However, if you're not confident with doing that, you can use one of the many plugins which are available. WooCommerce themselves do one: https://woocommerce.com/products/woocommerce-checkout-field-editor/



来源:https://stackoverflow.com/questions/48519678/changing-the-shipping-text-in-woocommerce-cart-and-checkout-pages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!