Skip to content

Commit

Permalink
Update blueprint.json
Browse files Browse the repository at this point in the history
  • Loading branch information
kilbot committed Mar 20, 2024
1 parent 2d9667f commit b96dbfe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .wordpress-org/blueprint.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
}
},
{
"step": "wpCLI",
"command": "wp wc product import wp-content/plugins/woocommerce/sample-data/sample_products.csv --user=admin"
"step": "runPHP",
"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"
},
{
"step": "runPHP",
Expand Down

0 comments on commit b96dbfe

Please sign in to comment.