WC_Email::get_email_groupspublicWC 10.3.0

Get available email groups with their titles.

Method of the class: WC_Email{}

Hooks from the method

Returns

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

Usage

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

Changelog

Since 10.3.0 Introduced.

WC_Email::get_email_groups() code WC 10.8.1

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 );
}