Home Forums WoodMart support forum CRITICAL Uncaught TypeError

CRITICAL Uncaught TypeError

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #430509

    metuza
    Participant

    Hello,

    Testing your wishlist module and get the below error when on sale emails should be sendt. So theses emails are not beeing sendt.

    2022-12-21T20:16:20+00:00 CRITICAL Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in /public/wp-content/themes/woodmart/inc/integrations/woocommerce/modules/wishlist/sends-about-products-wishlist/class-send-on-sales-products.php:101
    Stack trace:
    #0 /public/wp-content/themes/woodmart/inc/integrations/woocommerce/modules/wishlist/sends-about-products-wishlist/class-send-on-sales-products.php(101): in_array(Array, NULL, true)
    #1 /public/wp-includes/class-wp-hook.php(308): XTS\WC_Wishlist\Send_On_Sales_Products->register_on_sales_products()
    #2 /public/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(”, Array)
    #3 /public/wp-includes/plugin.php(565): WP_Hook->do_action(Array)
    #4 /public/wp-cron.php(188): do_action_ref_array(‘woodmart_wishli…’, Array)
    #5 {main}
    thrown i /public/wp-content/themes/woodmart/inc/integrations/woocommerce/modules/wishlist/sends-about-products-wishlist/class-send-on-sales-products.php på linje 101

    The back in stock emails works just great except from that the “Hi username” is not translatable.

    Brgds
    Rune

    #430520

    metuza
    Participant

    Hi again,

    After several tests i checked my database for “woodmart_wishlist_products_on_sale” and found it registered with a value of :{0} so i entered manually in an array with one product ID. Then restarted the cronjob “woodmart_wishlist_register_on_sales_products” and then it seems like everything works, the product array in option “woodmart_wishlist_products_on_sale” is now built complete and no more errors logged. Emails are also beeing sent.

    Brgds
    Rune

    • This reply was modified 1 year, 4 months ago by metuza.
    #430625

    Artem Temos
    Keymaster

    Hello,

    Thank you for letting us know. We will fix this error in our next theme update.

    Kind Regards

Viewing 3 posts - 1 through 3 (of 3 total)