• gift-card-design.php Line 88

    if ( in_array( $category_id, $selected_categories_unserialized, true ) && $item_id !== $post->ID || in_array( 'all', $term_slug_array, true ) || count( $selected_categories_unserialized ) === 1 ) :

    If $selected_categories_unserialized is empty or null:

    2022-12-12T12:06:59+00:00 CRITICAL Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in [redacted]/wp-content/plugins/yith-woocommerce-gift-cards/templates/yith-gift-cards/gift-card-design.php:88

    Version 2.15.0

    • This topic was modified 1 year, 11 months ago by cedus.
Viewing 1 replies (of 1 total)
  • Plugin Support Juan Coronel

    (@juaancmendez)

    Hello there,
    we hope you’re doing well!

    We have reviewed what you comment in our installation, but we were not able to reproduce it. Anyway, first try updating the plugin to the latest version that came out yesterday, and if the problem persists, try adding the following line of code to the gift-card-design.php file line 77:

    $selected_categories_unserialized = is_array( $selected_categories_unserialized ) ? $selected_categories_unserialized : array( '0' => '0' );

    Try it out and tell us any news, please.

    Have a nice day!

Viewing 1 replies (of 1 total)
  • The topic ‘Fatal Error with no Gift Card Category selected’ is closed to new replies.