wc_restore_locale()
Switch WooCommerce language to original.
No Hooks.
Return
null
. Nothing (null).
Usage
wc_restore_locale();
Changelog
Since 3.1.0 | Introduced. |
wc_restore_locale() wc restore locale code WC 8.7.0
function wc_restore_locale() { global $wp_locale_switcher; if ( function_exists( 'restore_previous_locale' ) && isset( $wp_locale_switcher ) ) { restore_previous_locale(); // Remove filter. remove_filter( 'plugin_locale', 'get_locale' ); // Init WC locale. WC()->load_plugin_textdomain(); } }