woocommerce_email_recipient_low_stock filter-hookWC 3.0.0

Filter the recipient of the low stock notification email.

Usage

add_filter( 'woocommerce_email_recipient_low_stock', 'wp_kama_woocommerce_email_recipient_low_stock_filter', 10, 3 );

/**
 * Function for `woocommerce_email_recipient_low_stock` filter-hook.
 * 
 * @param string     $recipient The recipient email address.
 * @param WC_Product $product   Product instance.
 * @param null       $null      Unused.
 *
 * @return string
 */
function wp_kama_woocommerce_email_recipient_low_stock_filter( $recipient, $product, $null ){

	// filter...
	return $recipient;
}
$recipient(string)
The recipient email address.
$product(WC_Product)
Product instance.
$null(null)
Unused.

Changelog

Since 3.0.0 Introduced.

Where the hook is called

WC_Emails::low_stock()
woocommerce_email_recipient_low_stock
woocommerce/includes/class-wc-emails.php 996
apply_filters( 'woocommerce_email_recipient_low_stock', get_option( 'woocommerce_stock_email_recipient' ), $product, null ),

Where the hook is used in WooCommerce

Usage not found.