get_batch_size() – Returns the batch size for an action.

You appear to be a bot. Output may be restricted

Description

Returns the batch size for an action.

Usage

$int = get_batch_size( $action );

Parameters

$action
( string ) required – Single batch action name.

Returns

int Batch size.

Source

File name: woocommerce/packages/woocommerce-admin/src/Schedulers/SchedulerTraits.php


Lines:

1 to 14 of 14
  public static function get_batch_size( $action ) {
    $batch_sizes = static::get_batch_sizes();
    $batch_size  = isset( $batch_sizes[ $action ] ) ? $batch_sizes[ $action ] : 25;

    
/**
 * Filter the batch size for regenerating a report table.
 *
 * @param int    $batch_size Batch size.
 * @param string $action Batch action name.
 */
    return apply_filters( 'woocommerce_analytics_regenerate_batch_size', $batch_size, static::$name, $action );
  }
 

 View on GitHub View on Trac