get_status();
if(isset($status) && $status == 'completed'){
$items = $order->get_items();
$arrayuser = array();
foreach ( $items as $item_id => $item ) {
$supplier_id = get_post_meta($item_id,'supplierid',true);
$arg = array(
'meta_key' => 'supplier_id',
'meta_value' => $supplier_id
);
$user_query = new WP_User_Query($arg);
$authors = $user_query->get_results();
foreach ($authors as $author) {
$arrayuser[] = $author->ID;
}
}
$uniqe_userid = array_unique($arrayuser);
$dropshipper_shipping_info = '';
$mainsupplier_id = $supplier_info['id'];
foreach ($uniqe_userid as $key => $value) {
$supplier_id = get_user_meta($value, 'supplier_id', true);
if($mainsupplier_id == $supplier_id)
{
$dropshipper_shipping_info = get_post_meta($order_info['id'], 'dropshipper_shipping_info_'.$value, true);
}
}
if(isset($dropshipper_shipping_info)) { ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
';
if($order_info['options']['full_information'] == '1') {
if($order_info['options']['product_image'] == '1') {
if($imgurl !='') {
$rows.=' | ';
} else {
$rows.=' | ';
}
}
} else {
if($order_info['options']['product_image'] == '1') {
if($imgurl !='') {
$rows.=' | ';
} else {
$rows.=' | ';
}
}
}
$rows .= ''.$prod_info['sku'].' |
'.$prod_info['variation_name'].' ';
$rows .= ' '.$prod_info['variation_labels'];
foreach($prod_info['order_item_meta'] as $meta)
{
$rows .= ' '.$meta->key.':'.trim($meta->value);
}
$rows .= ' |
'.$prod_info['qty'].' | ';
if($order_info['options']['full_information'] == '1') {
if($order_info['options']['type_of_package'] == '1') {
$rows .= ''.$typeofpackage.' | ';
}
} else {
if($order_info['options']['type_of_package'] == '1') {
$rows .= ''.$typeofpackage.' | ';
}
}
if($order_info['options']['full_information'] == '1') {
if($order_info['options']['product_price'] == '1') {
$rows .= ''.$price.' | ';
}
} else {
if($order_info['options']['product_price'] == '1') {
$rows .= ''.$price.' | ';
}
}
$rows .='';
}
if($order_info['options']['cost_of_goods'] == '0') {
if(($order_info['options']['hide_shipping_price'] == '0') || ($order_info['options']['hide_shipping_price'] == '')) {
$rows .= '';
if($order_info['options']['full_information'] == '1') {
if($order_info['options']['cost_of_goods'] == '0') {
$rows .= '| Shipping Cost | ';
$rows .= ''.$currency_sym.$get_shipping_total.' | ';
}
} else {
if($order_info['options']['cost_of_goods'] == '0') {
$rows .= 'Shipping Cost | ';
$rows .= ''.$currency_sym.$get_shipping_total.' | ';
}
}
// Tax price End
$rows .=' ';
}
$rows .= '';
if($order_info['options']['full_information'] == '1') {
if($order_info['options']['cost_of_goods'] == '0') {
$rows .= '| Taxes | ';
$rows .= ''.$currency_sym.$order_total_tax.' | ';
}
} else {
if($order_info['options']['cost_of_goods'] == '0') {
$rows .= 'Taxes | ';
$rows .= ''.$currency_sym.$order_total_tax .' | ';
}
}
// Tax price End
$rows .=' ';
$rows .= '';
if(($order_info['options']['hide_shipping_price'] == '0') || ($order_info['options']['hide_shipping_price'] == '')) {
$grandtotal = number_format($order_subtotal + $order_total_tax + $get_shipping_total , 2);
} else {
$grandtotal = number_format($order_subtotal + $order_total_tax, 2);
}
if($order_info['options']['full_information'] == '1') {
if($order_info['options']['total_price'] == '1') {
$rows .= '| Total | ';
$rows .= ''.$currency_sym.$grandtotal.' | ';
}
} else {
if($order_info['options']['total_price'] == '1') {
$rows .= 'Total | ';
$rows .= ''.$currency_sym.$grandtotal .' | ';
}
}
// total price End
$rows .=' ';
}
echo $rows;
?>
|