Skip to content

Instantly share code, notes, and snippets.

@xlplugins
Created May 12, 2017 11:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xlplugins/002f971e133f5002f0c3a278306393d5 to your computer and use it in GitHub Desktop.
Save xlplugins/002f971e133f5002f0c3a278306393d5 to your computer and use it in GitHub Desktop.
Change days, hrs, mins seconds like hard text in XL WooCommerce Sales Trigger Plugin
/**
* Add below code in theme functions.php file to change days, hrs, mins seconds like hard text
**/
add_filter('wcst_modify_hard_values', 'wcst_modify_hard_values', 10, 1);
function wcst_modify_hard_values($array) {
$array['others'] = 'andre';
$array['other'] = 'annen';
$array['from'] = 'fra ';
$array['in'] = 'i';
$array['&'] = '& ';
$array['hr'] = 't';
$array['hrs'] = 't';
$array['min'] = 'm';
$array['mins'] = 'm';
$array['sec'] = 's';
$array['secs'] = 's';
$array['day'] = 'dag';
$array['days'] = 'dager';
$array['week'] = 'uke';
$array['weeks'] = 'uker';
$array['month'] = 'måned';
$array['months'] = 'måneder';
return $array;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment