woocommerce_email_additional_content_(id) хук-фильтрWC 3.7.0

Provides an opportunity to inspect and modify additional content for the email.

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

add_filter( 'woocommerce_email_additional_content_(id)', 'wp_kama_woocommerce_email_additional_content_id_filter', 10, 3 );

/**
 * Function for `woocommerce_email_additional_content_(id)` filter-hook.
 * 
 * @param string      $additional_content Additional content to be added to the email.
 * @param object|bool $object             The object (ie, product or order) this email relates to, if any.
 * @param WC_Email    $email              WC_Email instance managing the email.
 *
 * @return string
 */
function wp_kama_woocommerce_email_additional_content_id_filter( $additional_content, $object, $email ){

	// filter...
	return $additional_content;
}
$additional_content(строка)
Additional content to be added to the email.
$object(объект|true|false)
The object (ie, product or order) this email relates to, if any.
$email(WC_Email)
WC_Email instance managing the email.

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

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

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

WC_Email::get_additional_content()
woocommerce_email_additional_content_(id)
woocommerce/includes/emails/class-wc-email.php 419
return apply_filters( 'woocommerce_email_additional_content_' . $this->id, $this->format_string( $this->get_option( 'additional_content' ) ), $this->object, $this );

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

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