• I have installed a brand new latest version of wordpress and woocommerce on a brand new site and then installed this plugin to import some products.

    When I try to upload a csv to define the header I get this error:
    Warning: array_key_exists() expects parameter 2 to be array, boolean given in /srv/www/woocommerce.dev/current/web/app/plugins/woocommerce-csvimport/admin/partials/woocsv-import-admin-header-preview.php on line 27

    Looking at the code it seems that it hasn’t created an expected wp_option record for woocsv_headers:
    $headers = get_option( ‘woocsv_headers’ );

    Any ideas what could be wrong please?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Any luck…same issue my side ??

    Thread Starter delythchandler

    (@delythchandler)

    Yes, I think my problem was due to the way my WordPress site is set up using Sage/Bedrock/Trellis – https://roots.io/, which gives it a different folder structure that the plugin was not able to cope with. Or it could have been that I am also using multi-site. Whichever the cause, I found this solution worked for me:

    I solved it by importing the header onto a traditional wordpress setup (just a simple blank site setup for this purpose), exported the 2 records this generated in wp_options that had option_name = woocsv_headers and woocsv_header as an SQL insert.

    I then imported/replaced these 2 records in my wordpress site and then was able to import the csv file successfully.

    Note: if your header file changes, you will need to repeat this procedure for the new header.

    I hope that’s of help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Cannot find header options when uploading a new header’ is closed to new replies.