woocommerce_email_stock_notification_button_link filter-hookWC 10.2.0

Filter the button href.

Usage

add_filter( 'woocommerce_email_stock_notification_button_link', 'wp_kama_woocommerce_email_stock_notification_button_link_filter', 10, 3 );

/**
 * Function for `woocommerce_email_stock_notification_button_link` filter-hook.
 * 
 * @param string       $button_href  The button href.
 * @param Notification $notification The notification object.
 * @param WC_Product   $product      The product object.
 *
 * @return string
 */
function wp_kama_woocommerce_email_stock_notification_button_link_filter( $button_href, $notification, $product ){

	// filter...
	return $button_href;
}
$button_href(string)
The button href.
$notification(Notification)
The notification object.
$product(WC_Product)
The product object.

Changelog

Since 10.2.0 Introduced.

Where the hook is called

CustomerStockNotificationEmail::get_additional_template_args()
woocommerce_email_stock_notification_button_link
woocommerce/src/Internal/StockNotifications/Emails/CustomerStockNotificationEmail.php 170-178
$button_link = apply_filters(
	'woocommerce_email_stock_notification_button_link',
	add_query_arg(
		$query_args,
		$notification->get_product_permalink()
	),
	$notification,
	$product
);

Where the hook is used in WooCommerce

Usage not found.