Created
April 12, 2024 23:52
-
-
Save rickgregory/f95bfc49c31fb44aea059b7fac9e566e to your computer and use it in GitHub Desktop.
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 | |
/* Changes the word Shipping to Delivery in the Woocommerce cart. Credit to Loictheaztec https://stackoverflow.com/a/53016991 */ | |
add_filter('woocommerce_shipping_package_name', 'change_shipping_text_to_delivery', 20, 3 ); | |
function change_shipping_text_to_delivery( $sprintf, $i, $package ) { | |
$sprintf = sprintf( _nx( 'Delivery', 'Delivery %d', ( $i + 1 ), 'delivery packages', 'woocommerce' ), ( $i + 1 ) ); | |
return $sprintf; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment