wc_payment_gateway_enabled_notification_email_addresses хук-фильтрWC 8.5.0

Allows adding to the addresses that receive payment gateway enabled notifications.

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

add_filter( 'wc_payment_gateway_enabled_notification_email_addresses', 'wp_kama_wc_payment_gateway_enabled_notification_email_addresses_filter', 10, 2 );

/**
 * Function for `wc_payment_gateway_enabled_notification_email_addresses` filter-hook.
 * 
 * @param array              $email_addresses The array of email addresses to notify.
 * @param WC_Payment_Gateway $gateway         The gateway that was enabled.
 *
 * @return array
 */
function wp_kama_wc_payment_gateway_enabled_notification_email_addresses_filter( $email_addresses, $gateway ){

	// filter...
	return $email_addresses;
}
$email_addresses(массив)
The array of email addresses to notify.
$gateway(WC_Payment_Gateway)
The gateway that was enabled.

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

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

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

WC_Payment_Gateways::notify_admin_payment_gateway_enabled()
wc_payment_gateway_enabled_notification_email_addresses
woocommerce/includes/class-wc-payment-gateways.php 203
$email_addresses   = apply_filters( 'wc_payment_gateway_enabled_notification_email_addresses', array(), $gateway );

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

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