woocommerce_account_customer_stock_notifications_per_page │ хук-фильтр │ WC 11.2.0

Filter the per-page count for the My Account stock-notifications table.

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

add_filter( 'woocommerce_account_customer_stock_notifications_per_page', 'wp_kama_woocommerce_account_customer_stock_notifications_per_page_filter' );

/**
 * Function for `woocommerce_account_customer_stock_notifications_per_page` filter-hook.
 * 
 * @param int $per_page Number of notifications shown per page.
 *
 * @return int
 */
function wp_kama_woocommerce_account_customer_stock_notifications_per_page_filter( $per_page ){
	// filter...
	return $per_page;
}
$per_page(int)
Number of notifications shown per page.
По умолчанию: {@see self::DEFAULT_PER_PAGE}

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

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

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

MyAccountEndpoint::render_endpoint()
woocommerce_account_customer_stock_notifications_per_page
woocommerce/src/Internal/StockNotifications/Frontend/MyAccountEndpoint.php 307
$per_page = (int) apply_filters( 'woocommerce_account_customer_stock_notifications_per_page', self::DEFAULT_PER_PAGE );

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

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