woocommerce_get_batch_processor
Filters the instance of a processor for a given class name.
Usage
add_filter( 'woocommerce_get_batch_processor', 'wp_kama_woocommerce_get_batch_processor_filter', 10, 2 ); /** * Function for `woocommerce_get_batch_processor` filter-hook. * * @param object|null $processor The processor instance given by the dependency injection container, or null if none was obtained. * @param string $processor_class_name The full class name of the processor. * * @return object|null */ function wp_kama_woocommerce_get_batch_processor_filter( $processor, $processor_class_name ){ // filter... return $processor; }
- $processor(object|null)
- The processor instance given by the dependency injection container, or null if none was obtained.
- $processor_class_name(string)
- The full class name of the processor.
Changelog
Since 6.8.0. | Introduced. |
Where the hook is called
woocommerce_get_batch_processor
woocommerce/src/Internal/BatchProcessing/BatchProcessingController.php 337
$processor = apply_filters( 'woocommerce_get_batch_processor', $processor, $processor_class_name );