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)) { ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
get_data();
$imgurl = $prod_info['imgurl'];
$dummyimg = plugin_dir_url( __FILE__ ).'no.png';
$price = $prod_info['price'];
$typeofpackage = $prod_info['typeofpackage'];
$currency_sym= get_woocommerce_currency_symbol();
$get_shipping_total = $order_info['get_shipping_total'];
$order_total_tax = $order_data['total_tax'];
$rows .= '';
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') {
$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 .=' ';
}
}
echo $rows;
?>
|