Warning and fatal error caused by undefined $package_review_text_lines

Plugin version: 3.2.5

When cart has a subscription product (so no shipping) then file inc/compat/plugins/compat-plugin-woocommerce-subscriptions.php throws two errors:

  1. PHP Warning: Undefined variable $package_review_text_lines in inc/compat/plugins/compat-plugin-woocommerce-subscriptions.php on line 614
  2. PHP Fatal error: Uncaught TypeError: array_merge(): Argument #2 must be of type array, null given in inc/compat/plugins/compat-plugin-woocommerce-subscriptions.php:532

get_packages_review_text_lines() function does not correctly initialize $package_review_text_lines variable, so when it is undefined, the subsequential function add_substep_text_lines_shipping_method()fails because it expects it to be an array.

  • This topic was modified 9 hours, 55 minutes ago by andrisp.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer