woocommerce_customer_stock_notifications_account_required_message_html
Filter the account required message HTML.
Использование
add_filter( 'woocommerce_customer_stock_notifications_account_required_message_html', 'wp_kama_woocommerce_customer_stock_notifications_account_required_message_html_filter', 10, 2 );
/**
* Function for `woocommerce_customer_stock_notifications_account_required_message_html` filter-hook.
*
* @param string|null $pre The message.
* @param WC_Product $product Product object.
*
* @return string|null
*/
function wp_kama_woocommerce_customer_stock_notifications_account_required_message_html_filter( $pre, $product ){
// filter...
return $pre;
}
- $pre(строка|null)
- The message.
- $product(WC_Product)
- Product object.
Список изменений
| С версии 10.2.0 | Введена. |
Где вызывается хук
woocommerce_customer_stock_notifications_account_required_message_html
woocommerce/src/Internal/StockNotifications/Frontend/ProductPageIntegration.php 148
$pre = apply_filters( 'woocommerce_customer_stock_notifications_account_required_message_html', null, $product );