Created
December 21, 2017 20:30
-
-
Save mtruitt/00069ecea81c2c2231f2199bd1565166 to your computer and use it in GitHub Desktop.
WooCommerce - Change Shipping Text to Shipping & Handling
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'woocommerce_shipping_package_name' , 'woocommerce_replace_text_shipping_to_delivery', 10, 3); | |
/** | |
* | |
* Function to replace shipping text to shipping & handling text | |
* | |
* @param $package_name | |
* @param $i | |
* @param $package | |
* | |
* @return string | |
*/ | |
function woocommerce_replace_text_shipping_to_delivery($package_name, $i, $package){ | |
return sprintf( _nx( 'Shipping & Handling', 'Shipping & Handling %d', ( $i + 1 ), 'shipping packages', 'woocommerce' ), ( $i + 1 ) ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment