Automattic\WooCommerce\Blueprint

ExportSchema::on_before_exportpublicWC 1.0

Subscribe to the onBeforeExport event.

Метод класса: ExportSchema{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$ExportSchema = new ExportSchema();
$ExportSchema->on_before_export( $step_name, $callback );
$step_name(строка) (обязательный)
The step name to subscribe to.
$callback(callable) (обязательный)
The callback to execute.

Код ExportSchema::on_before_export() WC 10.0.2

public function on_before_export( $step_name, $callback ) {
	$this->subscribe(
		'onBeforeExport',
		function ( $exporter ) use ( $step_name, $callback ) {
			if ( $step_name === $exporter->get_step_name() ) {
				$callback( $exporter );
			}
		}
	);
}