Automattic\WooCommerce\Internal\BatchProcessing
BatchProcessingController::get_processor_state_option_name
Get the name of the option where we will be saving state for a given processor.
Метод класса: BatchProcessingController{}
Хуков нет.
Возвращает
Строку. Option name.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_processor_state_option_name( $batch_processor ): string;
- $batch_processor(BatchProcessorInterface|строка) (обязательный)
- Batch processor instance or class name.
Код BatchProcessingController::get_processor_state_option_name() BatchProcessingController::get processor state option name WC 10.9.4
private function get_processor_state_option_name( $batch_processor ): string {
$class_name = is_a( $batch_processor, BatchProcessorInterface::class ) ? get_class( $batch_processor ) : $batch_processor;
$class_md5 = md5( $class_name );
// truncate the class name so we know that it will fit in the option name column along with md5 hash and prefix.
$class_name = substr( $class_name, 0, 140 );
return 'wc_batch_' . $class_name . '_' . $class_md5;
}