Automattic\WooCommerce\Blueprint
ExportSchema::on_before_export
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() ExportSchema::on before export code WC 10.6.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 );
}
}
);
}