woocommerce_account_customer_stock_notifications_pending_limit
Filter how many pending (awaiting confirmation) notifications the My Account stock-notifications tab lists above the active table.
The pending table is not paginated, so this is a hard cap.
Использование
add_filter( 'woocommerce_account_customer_stock_notifications_pending_limit', 'wp_kama_woocommerce_account_customer_stock_notifications_pending_limit_filter' );
/**
* Function for `woocommerce_account_customer_stock_notifications_pending_limit` filter-hook.
*
* @param int $limit Maximum number of pending notifications shown.
*
* @return int
*/
function wp_kama_woocommerce_account_customer_stock_notifications_pending_limit_filter( $limit ){
// filter...
return $limit;
}
- $limit(int)
- Maximum number of pending notifications shown.
По умолчанию: {@see self::DEFAULT_PER_PAGE}
Список изменений
| С версии 11.2.0 | Введена. |
Где вызывается хук
woocommerce_account_customer_stock_notifications_pending_limit
woocommerce/src/Internal/StockNotifications/Frontend/MyAccountEndpoint.php 320
$pending_limit = (int) apply_filters( 'woocommerce_account_customer_stock_notifications_pending_limit', self::DEFAULT_PER_PAGE );