• Hello,

    This error is showing in my error.log.

    Warning: array_filter() expects parameter 1 to be array, string given in /mypath/wp-content/plugins/woocommerce/includes/class-wc-product-variation.php on line 170

    Only the WooCommerce plugin is installed and I’m using the Twenty Nineteen theme.

    I tested it with other themes and the error remains.

    WordPress: 5.1.1
    WooCommerce: 3.5.7

Viewing 9 replies - 1 through 9 (of 9 total)
  • I was unable to reproduce the error. It has occurred in a section of code that makes the permalink for a product variation, and uses the variation’s attributes to make the permalink.

    Perhaps you have a product variation in the cart, in an order or in a page link, and have since modified or deleted the attributes for that variation.

    Thread Starter Kézily Correa

    (@kezily)

    @lorro this error happens in the cart and mini cart. I have already exclude the products and create again, the error continues.

    This error started on WooCommerce update.

    Please post the url to your site.

    Thread Starter Kézily Correa

    (@kezily)

    I can not because it’s from a client.

    I just loaded Twenty-Nineteen. Where did you put the mini-cart as 2019 doesn’t have a sidebar or header widget area. If I can I’ll try it.

    Plugin Support John Coy a11n

    (@johndcoy)

    Automattic Happiness Engineer

    Hi @kezily

    @lorro is spot on. Typically issues like this are caused by a theme or plugin conflict. Try switching back to a default theme like Twenty Nineteen and diable all plugins except for WooCommerce. If this helps, then re-enable each one at a time until you find the one that’s causing the conflict.

    Thread Starter Kézily Correa

    (@kezily)

    Thank you @johndcoy, but as I said, only the WooCommerce plugin is installed and I’m using the Twenty Nineteen theme.

    @kezily – Thanks for replying us.

    1. Since you can not provide us the website link, can you please give us the steps to replicate the issue?

    2. This question from @lorro (thank you!) is valid to continue troubleshooting the issue. Please give us the info for it:

    Where did you put the mini-cart as 2019 doesn’t have a sidebar or header widget area. If I can I’ll try it.

    Thanks.

    —–

    Quick reference for the error line – https://github.com/woocommerce/woocommerce/blob/3.5.7/includes/class-wc-product-variation.php#L170

    Mike M. a11n

    (@mikedmoore)

    Automattic Happiness Engineer

    Hi there,

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Variable Product Error’ is closed to new replies.