[2.3] Small tweak to use email ID rather than classname directly

#8365
This commit is contained in:
Mike Jolley 2015-06-16 14:47:03 +01:00
parent 2501af0376
commit 09fb3a604b
1 changed files with 2 additions and 3 deletions

View File

@ -47,11 +47,10 @@ class WC_Settings_Emails extends WC_Settings_Page {
$mailer = WC()->mailer();
$email_templates = $mailer->get_emails();
foreach ( $email_templates as $email ) {
foreach ( $email_templates as $email_id => $email ) {
$title = empty( $email->title ) ? ucfirst( $email->id ) : ucfirst( $email->title );
$sections[ strtolower( get_class( $email ) ) ] = esc_html( $title );
$sections[ strtolower( $email_id ) ] = esc_html( $title );
}
return apply_filters( 'woocommerce_get_sections_' . $this->id, $sections );