get_type() && ($orderItem->get_product_id() || $orderItem->get_variation_id()) ) { $itemId = $orderItem->get_id(); include Variables::$A4B_PLUGIN_BASE_PATH . 'src/templates/orders/import-order-item-checkbox.php'; } } } catch (\Throwable $th) { } } public function display() { $screens = ['shop_order', 'woocommerce_page_wc-orders']; foreach ($screens as $screen) { add_meta_box('barcode-print-order-create', __('Labels', 'a4-barcode-generator'), array($this, "orderViewPrint"), $screen, 'side', 'high'); } } public function orderViewPrint($post) { try { global $post, $theorder; if ($post instanceof \WP_Post) { $thepostid = $post->ID; } elseif (!empty($theorder)) { $thepostid = $theorder->get_id(); } else { $thepostid = null; } if ($thepostid) { $orderId = $thepostid; echo '