From f9f3054c2270b82e440f3ca805110fe62515424b Mon Sep 17 00:00:00 2001 From: Brent Shepherd Date: Mon, 19 Jan 2015 17:12:26 -0800 Subject: [PATCH] Restore $theorder SHA: 74ba11c1895fe7 removed instantiation of `$theorder` global in `WC_Meta_Box_Order_Actions::output()` as it was mistaken for unused code. However, some callbacks attached to hooks in that function may actually rely on that global to determine if actions should be displayed for certain orders. --- .../admin/meta-boxes/class-wc-meta-box-order-actions.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/includes/admin/meta-boxes/class-wc-meta-box-order-actions.php b/includes/admin/meta-boxes/class-wc-meta-box-order-actions.php index 456265dace3..580741618c0 100644 --- a/includes/admin/meta-boxes/class-wc-meta-box-order-actions.php +++ b/includes/admin/meta-boxes/class-wc-meta-box-order-actions.php @@ -23,6 +23,12 @@ class WC_Meta_Box_Order_Actions { * Output the metabox */ public static function output( $post ) { + global $theorder; + + if ( ! is_object( $theorder ) ) { + $theorder = wc_get_order( $post->ID ); + } + $order_type_object = get_post_type_object( $post->post_type ); ?>