• Resolved newby2015

    (@newby2015)


    Hi,
    after updating WordPress I get a Warning on every product page: Illegal string offset ‘is_taxonomy’ in /www/htdocs/example.com/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php on line 1384 Warning: Illegal string offset ‘name’ in /www/htdocs/example.com/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php on line 1385

    How can I fix this Warning?

    https://www.ads-software.com/plugins/woocommerce/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    Looks like you have a product with invalid data:

    https://github.com/woothemes/woocommerce/blob/master/includes/abstracts/abstract-wc-product.php#L1384

    Saving the product would resolve. Do you know if these products were imported, or have you used a bulk tool to edit attributes?

    Thread Starter newby2015

    (@newby2015)

    Thank you very much for your quick reply. Which data could be invalid?
    When I go to the product information at the backend there is:
    Warning: array_keys() expects parameter 1 to be array, string given in /www/htdocs/example.com/wp-content/plugins/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-product-data.php on line 437

    and

    Warning: Invalid argument supplied for foreach() in /www/htdocs/example.com/wp-content/plugins/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-product-data.php on line 597

    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    Attributes are stored within the product as an array, and the data you have is missing important parts. Save that product and the errors should disappear?

    Thread Starter newby2015

    (@newby2015)

    Perfect, thank you. But now all the attributes of all my products are gone. Is there a way to import those via CSV (cf__product_attributes)?

    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    What are you importing with?

    Thread Starter newby2015

    (@newby2015)

    With:
    WP CSV
    Version 1.8.0.0 | CPK Web Solutions

    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    You may want to try WP All Import which has a WooCommerce integration or Product CSV import suite. The format of attributes is serialised data so its slightly more complex to import from CSV if the plugin is not specifically designed to import WC content.

    Thread Starter newby2015

    (@newby2015)

    So it will work with WP All Import for sure?

    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    Thread Starter newby2015

    (@newby2015)

    Perfect, thank you soooo much.

    Hello,

    I think I am experiencing something similar. How do I fix these warnings? I can’t add products.

    Warning: Illegal string offset ‘name’ in /home/content/p3pnexwpnas14_data03/06/3103406/html/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php on line 394

    Warning: Illegal string offset ‘name’ in /home/content/p3pnexwpnas14_data03/06/3103406/html/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php on line 394

    Warning: Illegal string offset ‘file’ in /home/content/p3pnexwpnas14_data03/06/3103406/html/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php on line 395

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Warning. Illegal string offset 'is-taxonomy'’ is closed to new replies.