woocommerce_regenerate_variation_summaries_sync_threshold
Filters the threshold for synchronous regeneration of variation attribute summaries. If the number of variations affected by an update is below this threshold, the summaries are regenerated synchronously. Otherwise, the regeneration is scheduled asynchronously.
Usage
add_filter( 'woocommerce_regenerate_variation_summaries_sync_threshold', 'wp_kama_woocommerce_regenerate_variation_summaries_sync_threshold_filter' );
/**
* Function for `woocommerce_regenerate_variation_summaries_sync_threshold` filter-hook.
*
* @param int $threshold The default threshold value (50).
*
* @return int
*/
function wp_kama_woocommerce_regenerate_variation_summaries_sync_threshold_filter( $threshold ){
// filter...
return $threshold;
}
- $threshold(int)
- The default threshold value (50).
Changelog
| Since 10.2.0 | Introduced. |
Where the hook is called
woocommerce_regenerate_variation_summaries_sync_threshold
woocommerce/includes/class-wc-post-data.php 808
return absint( apply_filters( 'woocommerce_regenerate_variation_summaries_sync_threshold', 50 ) );