WordPress at Your Fingertips
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.

Usage

$result = OnboardingTasks::import_sample_products();

Code of OnboardingTasks::import_sample_products() WC 6.1.1

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