Skip to content

Commit b96dbfe

Browse files
committed
Update blueprint.json
1 parent 2d9667f commit b96dbfe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.wordpress-org/blueprint.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
}
4545
},
4646
{
47-
"step": "wpCLI",
48-
"command": "wp wc product import wp-content/plugins/woocommerce/sample-data/sample_products.csv --user=admin"
47+
"step": "runPHP",
48+
"code": "<?php\nrequire_once(ABSPATH . 'wp-load.php');\n\nif (class_exists('WC_Product_CSV_Importer')) {\n $import_file = ABSPATH . 'wp-content/plugins/woocommerce/sample-data/sample_products.csv';\n $args = [\n 'delimiter' => ',', // CSV delimiter\n 'start_pos' => 0, // Starting position\n 'mapping' => [], // Column mapping, leave empty for automatic mapping\n 'parse' => true, // Parse file\n ];\n\n $importer = new WC_Product_CSV_Importer($import_file, $args);\n $results = $importer->import();\n}\n"
4949
},
5050
{
5151
"step": "runPHP",

0 commit comments

Comments
 (0)