×

 

Home Contact Us Payments SC Commerce SC Commerce Docs SC Commerce Snippets

Simply Computing

We make websites. Simple.

Change any text string in SC Commerce

You can easily change any text string appearing in SC Commerce with this code. This example changes the text on the empty cart page from “Return to shop” to “Return to product listing”

		/**
 * Change any text string in SC Commerce
 */

add_filter('gettext', 'cc_change_text_string');
add_filter('ngettext', 'cc_change_text_string');

function cc_change_text_string($changed_text) {

  $changed_text = str_ireplace('Return to shop',  'Return to product listing',  $changed_text);
  return $changed_text;

}
	
   View Raw Code ID: 9952