mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-04-29 11:32:21 +08:00
12 lines
396 B
Text
12 lines
396 B
Text
add_filter( 'gettext', 'wc_translate_shipping_todiffaddr', 9999, 3 );
|
|
|
|
function wc_translate_shipping_todiffaddr( $translated, $untranslated, $domain ) {
|
|
if ( ! is_admin() && 'woocommerce' === $domain ) {
|
|
switch ( $untranslated ) {
|
|
case 'Ship to a different address?':
|
|
$translated = 'Ship elsewhere?';
|
|
break;
|
|
}
|
|
}
|
|
return $translated;
|
|
}
|