Skip to content

Instantly share code, notes, and snippets.

@jhimross
Created January 28, 2022 03:54
Show Gist options
  • Save jhimross/3c8f50f67503af0cb0fe6e7027bf8baa to your computer and use it in GitHub Desktop.
Save jhimross/3c8f50f67503af0cb0fe6e7027bf8baa to your computer and use it in GitHub Desktop.
Orderable - Change "Today" and "Tomorrow" label in the checkout
/**
* Orderable.
* Modify 'Today' label.
*
*/
function change_delivery_today_text( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'Today' :
$translated_text = __( 'Add Text Here', 'woocommerce' );
break;
}
return $translated_text;
}
add_filter( 'gettext', 'change_delivery_today_text', 20, 3 );
/**
* Orderable.
* Modify 'Tomorrow' label.
*
*/
function change_delivery_tomorrow_text( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'Tomorrow' :
$translated_text = __( 'Add Text Here', 'woocommerce' );
break;
}
return $translated_text;
}
add_filter( 'gettext', 'change_delivery_tomorrow_text', 20, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment