Crashes cart page and doesn’t show message
-
Hi,
I just updated to php 8.1 and since then I’m getting the error below. The cart page where it is supposed to show a message crashes and doesn’t show the message.
If I remove the line from class.yith-woocommerce-cart-messages.php:344 the plugin functions as expected. I’m not skilled enough to fix it, just found the problem.
[13-Jan-2023 15:01:55 UTC] PHP Fatal error: Uncaught TypeError: Unsupported operand types: string - int in /data/staging/wp-content/plugins/yith-woocommerce-cart-messages/class.yith-woocommerce-cart-messages.php:344 Stack trace: 0 /data/staging/wp-content/plugins/yith-woocommerce-cart-messages/class.yith-woocommerce-cart-messages.php(276): YWCM_Cart_Messages->get_products_cart_args() 1 /data/staging/wp-includes/class-wp-hook.php(308): YWCM_Cart_Messages->print_messages() 2 /data/staging/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() 3 /data/staging/wp-includes/plugin.php(517): WP_Hook->do_action() 4 /data/staging/wp-content/themes/fonalshop2017/woocommerce/cart/cart.php(36): do_action() 5 /data/staging/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include('…') 6 /data/staging/wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-cart.php(99): wc_get_template() 7 /data/staging/wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php(72): WC_Shortcode_Cart::output() 8 /data/staging/wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php(85): WC_Shortcodes::shortcode_wrapper() 9 /data/staging/wp-includes/shortcodes.php(355): WC_Shortcodes::cart() 10 [internal function]: do_shortcode_tag() 11 /data/staging/wp-includes/shortcodes.php(227): preg_replace_callback() 12 /data/staging/wp-includes/class-wp-hook.php(308): do_shortcode() 13 /data/staging/wp-includes/plugin.php(205): WP_Hook->apply_filters() 14 /data/staging/wp-includes/post-template.php(255): apply_filters() 15 /data/staging/wp-content/themes/fonalshop2017/page.php(21): the_content() 16 /data/staging/wp-includes/template-loader.php(106): include('…') 17 /data/staging/wp-blog-header.php(19): require_once('…') 18 /data/staging/index.php(17): require('…') 19 {main} thrown in /data/staging/wp-content/plugins/yith-woocommerce-cart-messages/class.yith-woocommerce-cart-messages.php on line 344
- The topic ‘Crashes cart page and doesn’t show message’ is closed to new replies.