Automattic\WooCommerce\Blueprint

ExportSchema::on_before_exportpublicWC 1.0

Subscribe to the onBeforeExport event.

Method of the class: ExportSchema{}

No Hooks.

Returns

null. Nothing (null).

Usage

$ExportSchema = new ExportSchema();
$ExportSchema->on_before_export( $step_name, $callback );
$step_name(string) (required)
The step name to subscribe to.
$callback(callable) (required)
The callback to execute.

ExportSchema::on_before_export() code WC 9.9.5

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 );
			}
		}
	);
}