BatchProcessingController::get_processor_state_option_name()privateWC 1.0

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.

Код BatchProcessingController::get_processor_state_option_name() WC 7.7.2

private function get_processor_state_option_name( BatchProcessorInterface $batch_processor ): string {
	$class_name = get_class( $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;