How to Change “Return to Shop” Button text in Woocommerce

Categories:

Change “Return to Shop” Button text in Woocommerce a WordPress plugin this is quit easy to change it using function hook. If you are not using shop or name it something like back to home or store.

change return to shop button text

Change “Return to Shop” Button text in Woocommerce

Copy below code and paste into theme function.php file

add_filter( 'gettext', 'change_woocommerce_return_to_shop_text', 20, 3 );
function change_woocommerce_return_to_shop_text( $translated_text, $text, $domain ) {
ย  ย  ย  ย switch ( $translated_text ) {
ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  case 'Return to shop' :
ย  ย $translated_text = __( 'Return to Store', 'woocommerce' );
ย  ย break;
ย  }
ย return $translated_text; 

}

Also make sure you must take backup of file before proceeding.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *