• The plugin causes a critical error. It seems that the plugin tries to switch to mobile layout for some reason.

    In the log I can find:
    2022-09-15T06:02:43+00:00 CRITICAL Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in /var/www/vhosts/simtasia.shop/httpdocs/webshop/wp-content/plugins/yith-woocommerce-gift-cards/templates/yith-gift-cards/gift-card-design.php:88

    I am using
    WooCommerce 6.8.2
    Yith 2.13.0
    Theme Storefront

    Can you help resolve this issue, the gift cards cannot be purchased on our site at this moment.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Juan Coronel

    (@juaancmendez)

    Hello Ellen,
    we hope you’re doing well!

    We have reviewed this at our installations but were unable to reproduce it. Did it happen with the previous version?

    If so, we recommend performing the following tests:

    – switch to a default WordPress theme like 2022.
    – If the problem persists, try leaving only WooCommerce and our plugin active, and then activate your plugins in batches to determine which one is causing this conflict.

    We will be attentive to your response.

    Best regards.

    Thread Starter ellenderidder

    (@ellenderidder)

    Hi Juan,

    Thanks for your reply. I am using the latest version of you plugin. I hope you understand I cannot just switch themes and disable all plugins, we are trying to sell stuff on this website :-).

    But after some digging in your code I think I found the problem (although I have trouble reproducing it myself too). Apparently during the update of the plugin all gift card categories (for the images) on the product page got de-selected. Once I selected one gift card category and updated the product, all was working fine again.

    Strange thing is, when I deselect everything again, it still works… But I didn’t want to experiment too much (too happy it is fixed). But maybe something you can ask one of the developers to look into?

    But happy to say this issue is resolved!

    Kind regards,

    Ellen

    Plugin Support Juan Coronel

    (@juaancmendez)

    Hello Ellen,

    We are glad that everything is going well now.

    In the last updates, there were some code refactorings, and it is likely that some products created with somewhat old versions of the plugin generate this type of errors. Updating the product, or simply creating a new one should fix those errors.

    In any case, if for some reason you manage to reproduce the error again, we will be attentive to it.

    Have a nice day!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Critical error occurred’ is closed to new replies.