postmeta_form_limit filter-hookWC 8.8.0

This is a WordPress - postmeta_form_limit hook. The plugin just uses it.

Compatibility filter for postmeta_form_limit, which filters the number of custom fields to retrieve for the drop-down in the Custom Fields meta box.

Usage

add_filter( 'postmeta_form_limit', 'wp_kama_postmeta_form_limit_filter' );

/**
 * Function for `postmeta_form_limit` filter-hook.
 * 
 * @param int $limit Number of custom fields to retrieve.
 *
 * @return int
 */
function wp_kama_postmeta_form_limit_filter( $limit ){

	// filter...
	return $limit;
}
$limit(int)
Number of custom fields to retrieve.
Default: 30

Changelog

Since 8.8.0 Introduced.

Where the hook is called

CustomMetaBox::order_meta_keys_autofill()
postmeta_form_limit
woocommerce/src/Internal/Admin/Orders/MetaBoxes/CustomMetaBox.php 125
$limit = apply_filters( 'postmeta_form_limit', 30 );

Where the hook is used in WooCommerce

Usage not found.