WC_Email::get_email_groups │ public │ WC 10.3.0

Get available email groups with their titles.

Метод класса: WC_Email{}

Хуки из метода

Возвращает

array. Associative array of email group slugs => titles.

Использование

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

Список изменений

С версии 10.3.0 Введена.

Код WC_Email::get_email_groups() WC 11.3.0

public function get_email_groups() {
	$email_groups = array(
		'accounts'         => __( 'Accounts', 'woocommerce' ),
		'orders'           => __( 'Orders', 'woocommerce' ),
		'order-processing' => __( 'Order updates', 'woocommerce' ),  // @deprecated Please use 'order-updates' instead. Will be removed in 10.5.0.
		'order-updates'    => __( 'Order updates', 'woocommerce' ),
		'order-exceptions' => __( 'Order changes', 'woocommerce' ),  // @deprecated Please use 'order-changes' instead. Will be removed in 10.5.0.
		'order-changes'    => __( 'Order changes', 'woocommerce' ),
		'payments'         => __( 'Payments', 'woocommerce' ),
	);

	/**
	 * Filter the available email groups.
	 *
	 * @since 10.3.0
	 * @param array $email_groups Associative array of email group slugs => titles.
	 */
	return apply_filters( 'woocommerce_email_groups', $email_groups );
}