I’ve created a CSV file with WooCommerce tax charges and need to import it with a PHP script. How can I do that?
I wrote this code:
<?php
// path to the file on my system
require "../wp-content/plugins/woocommerce/woocommerce.php";
$wc_importer = new WooCommerceAdminImportersWC_Tax_Rate_Importer();
$wc_importer->import('take a look at.csv');
however after I run it like this:
$ php -d display_errors=1 -f import.php
nothing occurs. There isn’t any output to the console. Thank in your assist.
PS: I perceive this website doesn’t welcome WooCommerce questions however I imagine this query is extra about PHP programming than WooCommerce therefore attempting to submit it right here.
I believe there may very well be couple of points right here:
- Methods to import the bundle accurately
- Methods to direct messages to console