问题
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