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