By adding this prevention, it also stops fatal errors (calling method on non-object) from happening down the line when working with the orders list that is always assumed to be a proper order object.
Example error this prevents:
```
Fatal error: Uncaught Error: Call to a member function get_items() on bool in /wp-content/plugins/woocommerce/includes/class-wc-order.php on line 1902
```
This creates a tradeoff in optimizing repeated queries vs on off queries.
Another tradeoff is making more cache get calls as opposed to more SQL calls.
Primary reason for dropping the cache hydration is that seems like we can acheive the same results without it, so no need to add this additional complexity to our code.
Another situation where this change is required when there are two coupons in an order but only one coupon has limit. In this case array will be present but one of the coupon will not have a corresponding record which will throw a notice.
Reverting commit 61c7abc in commit ece9f02776, overrode a unrelated change made to the same code in another PR by commit c765ce644d. This commit simply reapplies this change.
An amount refunded should be numeric, I was receiving pHP notices that a non numeric value was encountered. Seems this is something potentially new as of PHP 7.1? Is there any reason we should **not** return a float here? Any null or empty response from the SQL query would be 0, which would still be accurate for the total that was refunded for that order.
```2018/01/27 16:50:50 [error] 46797#0: *2930 FastCGI sent in stderr: "PHP message: PHP Warning: A non-numeric value encountered in /wp-content/plugins/woocommerce/includes/admin/meta-boxes/views/html-order-items.php on line 212
PHP message: PHP Stack trace:
PHP message: PHP 1. include() /cms/wp-admin/post.php:174
PHP message: PHP 2. do_meta_boxes() /cms/wp-admin/edit-form-advanced.php:714
PHP message: PHP 3. WC_Meta_Box_Order_Items::output() /cms/wp-admin/includes/template.php:1063
PHP message: PHP 4. include() /wp-content/plugins/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-items.php:41```