woocommerce_email_order_meta_fields filter-hookWC 1.0

Add order meta to email templates.

Usage

add_filter( 'woocommerce_email_order_meta_fields', 'wp_kama_woocommerce_email_order_meta_fields_filter', 10, 3 );

/**
 * Function for `woocommerce_email_order_meta_fields` filter-hook.
 * 
 * @param WC_Order $order         Order instance.
 * @param bool     $sent_to_admin If should sent to admin.
 * @param bool     $plain_text    If is plain text email.
 *
 * @return WC_Order
 */
function wp_kama_woocommerce_email_order_meta_fields_filter( $order, $sent_to_admin, $plain_text ){

	// filter...
	return $order;
}
$order(WC_Order)
Order instance.
$sent_to_admin(true|false)
If should sent to admin.
$plain_text(true|false)
If is plain text email.

Where the hook is called

WC_Emails::order_meta()
woocommerce_email_order_meta_fields
woocommerce/includes/class-wc-emails.php 492
$fields = apply_filters( 'woocommerce_email_order_meta_fields', array(), $sent_to_admin, $order );

Where the hook is used in WooCommerce

Usage not found.