WordPress at Your Fingertips
function is not described

WC_Product_CSV_Importer_Controller::output_errors() protected WC 1.0

Add error message.

{} It's a method of the class: WC_Product_CSV_Importer_Controller{}

No Hooks.

Return

null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->output_errors();

Code of WC_Product_CSV_Importer_Controller::output_errors() WC 5.9.0

protected function output_errors() {
	if ( ! $this->errors ) {
		return;
	}

	foreach ( $this->errors as $error ) {
		echo '<div class="error inline">';
		echo '<p>' . esc_html( $error['message'] ) . '</p>';

		if ( ! empty( $error['actions'] ) ) {
			echo '<p>';
			foreach ( $error['actions'] as $action ) {
				echo '<a class="button button-primary" href="' . esc_url( $action['url'] ) . '">' . esc_html( $action['label'] ) . '</a> ';
			}
			echo '</p>';
		}
		echo '</div>';
	}
}