WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\API

OnboardingTasks::import_sample_products() public WC 1.0

Import sample products from WooCommerce sample CSV.

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

No Hooks.

Return

WP_Error|WP_REST_Response. Nothing.

Usage

$result = OnboardingTasks::import_sample_products();

Code of OnboardingTasks::import_sample_products() WC 5.3.0

<?php
public static function import_sample_products() {
	$sample_csv_file = WC_ABSPATH . 'sample-data/sample_products.csv';

	$import = self::import_sample_products_from_csv( $sample_csv_file );
	return rest_ensure_response( $import );
}