The “Ship to a Different Address?” checkbox displays on the WooCommerce Checkout page and toggles the shipping form. That’s useful when Billing and Shipping addresses are different, so let’s say every B2C requires the double form.
However, the “Ship to a Different Address?” string may be confusing or may need further clarification, as not all customers are created equal. What about “I’d like to define a different shipping address” or “Ship to a different address than the Billing one“?
Either way, editing the string is super easy, so you can change it to whatever you like. Enjoy!
PHP Snippet: Edit the “Ship to a Different Address?” Checkbox @ WooCommerce Checkout
/**
* @snippet Translate "Ship to a Different Address?" @ Checkout
* @how-to Get CustomizeWoo.com FREE
* @author Rodolfo Melogli
* @compatible WooCommerce 7
* @community https://businessbloomer.com/club/
*/
add_filter( 'gettext', 'bbloomer_translate_shippingtodiffaddr', 9999, 3 );
function bbloomer_translate_shippingtodiffaddr( $translated, $untranslated, $domain ) {
if ( ! is_admin() && 'woocommerce' === $domain ) {
switch ( $untranslated ) {
case 'Ship to a different address?':
$translated = 'Ship elsewhere?';
break;
}
}
return $translated;
}
Hi Rodolfo,
it’s working but for one language. How to make it tranletable (I’m using WPML)?
Hi Alen! Just replace:
with:
And now the string should be translatable