Fatal Error when “Search orders” result is empty

On the WooCommerce Orders page, entering a search term and clicking the “Search orders” button causes Ultimate Order Combinations plugin to throw a fatal error if the term is not found:

Fatal error: Uncaught Error: Call to a member function get_items() on bool in /usr/local/var/www/Sites/created-by-couture.com/public_html/wp-content/plugins/woo-ultimate-order-combination/inc/functions.php:1103 Stack trace: #0 /usr/local/var/www/Sites/created-by-couture.com/public_html/wp-includes/class-wp-hook.php(324): wuoc_admin_scripts(‘edit.php’) #1 /usr/local/var/www/Sites/created-by-couture.com/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #2 /usr/local/var/www/Sites/created-by-couture.com/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #3 /usr/local/var/www/Sites/created-by-couture.com/public_html/wp-admin/admin-header.php(118): do_action(‘admin_enqueue_s…’, ‘edit.php’) #4 /usr/local/var/www/Sites/created-by-couture.com/public_html/wp-admin/edit.php(411): require_once(‘/usr/local/var/…’) #5 {main} thrown in /usr/local/var/www/Sites/created-by-couture.com/public_html/wp-content/plugins/woo-ultimate-order-combination/inc/functions.php on line 1103

It appears that the code at functions.php line 1103 is not detecting that the $order_obj is empty before trying to call its get_items() function.

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

 

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