allcaps['edit_shop_order'] || !$get_userdata->allcaps['read_shop_order'] || !$get_userdata->allcaps['edit_shop_orders'] || !$get_userdata->allcaps['edit_others_shop_orders'] || !$get_userdata->allcaps['publish_shop_orders'] || !$get_userdata->allcaps['read_private_shop_orders'] || !$get_userdata->allcaps['edit_private_shop_orders'] || !$get_userdata->allcaps['edit_published_shop_orders'] ) { return false; } $countryCollection = WC()->countries->countries; $settings = new Aramex_Shipping_Method(); $city = $settings->settings['city']; $postalcode = $settings->settings['postalcode']; $country = $settings->settings['country']; $allowed_domestic_methods = $settings->form_fields['allowed_domestic_methods']['options']; $allowed_international_methods = $settings->form_fields['allowed_international_methods']['options']; $dom = $settings->settings['allowed_domestic_methods']; $exp = $settings->settings['allowed_international_methods']; $order_id = $order->get_id(); $state = $settings->settings['state']; $email = $settings->settings['email_origin']; $company = $settings->settings['company']; $phone = $settings->settings['phone']; $address = $settings->settings['address']; $name = $settings->settings['name']; //calculating total weight of current order $totalWeight = 0; $weight = 0; $itemsv = $order->get_items(); if (count($itemsv) > 0) { foreach ($itemsv as $itemvv) { if ($itemvv['product_id'] > 0) { $product = $order->get_product_from_item($itemvv); if (!$product->is_virtual()) { $productData = $product->get_data(); if( $product->is_type( 'simple' ) ){ // a simple product $weight = $productData['weight']; } elseif( $product->is_type( 'variation' ) || $product->is_type( 'variable' ) ){ // a variable product if(empty($productData['weight'])){ if(wc_get_product($product->get_parent_id())){ $parent_weight = $product->get_parent_data(); $weight = $parent_weight['weight']; } }else{ $weight = $productData['weight']; } } $totalWeight += (float)$weight * $itemvv['qty']; } } } } ?>

" class="width-150 fl"/>
get_shipping_country()) ? $order->get_shipping_country() : ''; ?>

*