woocommerce_email_headers
Filter the headers of the low stock notification email.
Использование
add_filter( 'woocommerce_email_headers', 'wp_kama_woocommerce_email_headers_filter', 10, 3 );
/**
* Function for `woocommerce_email_headers` filter-hook.
*
* @param string $headers The email headers.
* @param WC_Product $product Product instance.
* @param $null
*
* @return string
*/
function wp_kama_woocommerce_email_headers_filter( $headers, $product, $null ){
// filter...
return $headers;
}
- $headers(строка)
- The email headers.
- $product(WC_Product)
- Product instance.
- $null
- -
Список изменений
| С версии 3.0.0 | Введена. |
Где вызывается хук
woocommerce_email_headers
woocommerce_email_headers
woocommerce_email_headers
woocommerce_email_headers
woocommerce/includes/class-wc-emails.php 1068
apply_filters( 'woocommerce_email_headers', '', 'low_stock', $product, null ),
woocommerce/includes/emails/class-wc-email.php 711
return apply_filters( 'woocommerce_email_headers', $header, $this->id, $this->object, $this );
woocommerce/includes/class-wc-emails.php 1155
apply_filters( 'woocommerce_email_headers', '', 'no_stock', $product, null ),
woocommerce/includes/class-wc-emails.php 1241
apply_filters( 'woocommerce_email_headers', '', 'backorder', $args, null ),