woocommerce_email_order_meta_fields хук-фильтрWC 1.0

Add order meta to email templates.

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

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.

Где вызывается хук

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

Где используется хук в WooCommerce

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