woocommerce_allow_switching_email_locale
Filter the ability to switch email locale.
Использование
add_filter( 'woocommerce_allow_switching_email_locale', 'wp_kama_woocommerce_allow_switching_email_locale_filter', 10, 2 );
/**
* Function for `woocommerce_allow_switching_email_locale` filter-hook.
*
* @param bool $default_value The default returned value.
* @param WC_Email $that The WC_Email object.
*
* @return bool
*/
function wp_kama_woocommerce_allow_switching_email_locale_filter( $default_value, $that ){
// filter...
return $default_value;
}
- $default_value(true|false)
- The default returned value.
- $that(WC_Email)
- The WC_Email object.
Список изменений
| С версии 6.8.0 | Введена. |
Где вызывается хук
woocommerce_allow_switching_email_locale
woocommerce/includes/emails/class-wc-email.php 412
$switch_email_locale = apply_filters( 'woocommerce_allow_switching_email_locale', true, $this );