Skip to content

Instantly share code, notes, and snippets.

@thierrypigot
Last active August 29, 2015 14:09
Show Gist options
  • Save thierrypigot/d59a802f8fa85afc2741 to your computer and use it in GitHub Desktop.
Save thierrypigot/d59a802f8fa85afc2741 to your computer and use it in GitHub Desktop.
Admin in FR, front in IT
<?php
add_filter('locale', 'tp_setLocale');
function tp_setLocale($locale) {
if ( !is_admin() && isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'woocommerce_update_order_review' ) {
return 'it_IT';
}
return $locale;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment