<?php global $woocommerce, $current_user, $wpdb; $order_id = isset($_GET['order_id']) ? intval($_GET['order_id']) : 0; if (!dokan_is_seller_has_order($current_user->ID, $order_id)) { echo '<div class="dokan-alert dokan-alert-danger">' . __('This is not yours, I swear!', 'dokan') . '</div>'; return; } $statuses = wc_get_order_statuses(); $order = new WC_Order($order_id); ?> <div class="dokan-clearfix"> <div class="dokan-w7" style="margin-right:3%;"> <div class="doakn-clearfix"> <div class="" style="width:100%"> <div class="dokan-panel dokan-panel-default"> <div class="dokan-panel-heading"><strong><?php printf('Order#%d', $order->id); ?> </strong> → <?php _e('Order Items', 'dokan'); ?> </div> <div class="dokan-panel-body"> <table cellpadding="0" cellspacing="0" class="dokan-table order-items"> <thead> <tr> <th class="item" colspan="2"><?php _e('Item', 'woocommerce');
/** * Mark a order as processing * * Fires from frontend seller dashboard */ function process_order() { if (!is_admin()) { die; } if (!current_user_can('dokandar') && dokan_get_option('order_status_change', 'dokan_selling', 'on') != 'on') { wp_die(__('You do not have sufficient permissions to access this page.', 'dokan')); } if (!check_admin_referer('dokan-mark-order-processing')) { wp_die(__('You have taken too long. Please go back and retry.', 'dokan')); } $order_id = isset($_GET['order_id']) && (int) $_GET['order_id'] ? (int) $_GET['order_id'] : ''; if (!$order_id) { die; } if (!dokan_is_seller_has_order(get_current_user_id(), $order_id)) { wp_die(__('You do not have permission to change this order', 'dokan')); } $order = new WC_Order($order_id); $order->update_status('processing'); wp_safe_redirect(wp_get_referer()); }
public function shipping_order() { if (!is_admin()) { die; } if (!current_user_can('dokandar') || dokan_get_option('order_status_change', 'dokan_selling', 'on') != 'on') { wp_die(__('You do not have sufficient permissions to access this page.', 'dokan')); } if (!check_admin_referer('dokan-mark-order-shipping')) { wp_die(__('You have taken too long. Please go back and retry.', 'dokan')); } $order_id = isset($_GET['order_id']) && (int) $_GET['order_id'] ? (int) $_GET['order_id'] : ''; if (!$order_id) { die; } if (!dokan_is_seller_has_order(get_current_user_id(), $order_id)) { wp_die(__('You do not have permission to change this order', 'dokan')); } update_post_meta($order_id, '_custom_tracking_provider', $_POST['tracking_provider']); update_post_meta($order_id, '_tracking_number', $_POST['tracking_number']); wp_safe_redirect(wp_get_referer()); die; }