WordPress at Your Fingertips
function is not described

WC_Email::setup_locale() public WC 1.0

Set the locale to the store locale for customer emails to make sure emails are in the store language.

{} It's a method of the class: WC_Email{}

Hooks from the method

Return

null. Nothing.

Usage

$WC_Email = new WC_Email();
$WC_Email->setup_locale();

Code of WC_Email::setup_locale() WC 5.9.0

public function setup_locale() {
	if ( $this->is_customer_email() && apply_filters( 'woocommerce_email_setup_locale', true ) ) {
		wc_switch_to_site_locale();
	}
}