Forum Replies Created
-
AuthorPosts
-
November 24, 2022 at 4:04 PM in reply to: Code for Customer adresses and product detail in the vendor dashboard #146703
promita
KeymasterHi James, use this code in your functions.php file.
add_filter('mvx_datatable_order_list_table_headers', 'test_callback', 10, 2);
function test_callback($orders_list_table_headers, $current_user_id) {
$orders_list_table_headers['billing_name'] = array('label' => __( 'Noms et Adresses', 'multivendorx' ));
$orders_list_table_headers['products'] = array('label' => __( 'Articles', 'multivendorx' ));
return $orders_list_table_headers;
}
add_filter('mvx_datatable_order_list_row', 'test_function', 10, 2);
function test_function($vendor_rows, $order) {
$item_name = array();
foreach ($order->get_items() as $item_key => $item_values) {
$item_name[] = $item_values->get_name();
}
$vendor_rows['billing_name'] = $order->get_billing_first_name() . ' ' . $order->get_billing_last_name() .'</br></br><b>Ship To:</b></br>'. $order->get_formatted_shipping_address();
$vendor_rows['products'] = implode(" ", $item_name);
return $vendor_rows;
}
Let us know if you have any further query.
promita
KeymasterHi Klaus Thomas Russ, In order to hide those order status add this code in functions.php of your child theme :
//hide order status from vendor dashboard
add_filter('mvx_vendor_order_statuses','hide_status');
function hide_status($status) {
unset($status['wc-on-hold']); //remove on-hold
unset($status['wc-failed']); //remove failed
unset($status['wc-checkout-draft']); //remove draft
return $status;
}
Let us know if you have any further query.
promita
KeymasterHi Klaus Thomas Russ, In order to hide this features from vendor dashboard, you can add this code in functions.php of your child theme :
add_filter( 'mvx_before_dashboard_widget', 'new_before_mvx_dashboard_widget', 10, 1 ); function new_before_mvx_dashboard_widget( $vendor_dashboard_widget ) { unset($vendor_dashboard_widget['side']['mvx_vendor_product_stats']); //remove Product Stats widget unset($vendor_dashboard_widget['full']['mvx_vendor_stats_reports']); //remove Stats report widget unset($vendor_dashboard_widget['normal']['mvx_vendor_visitors_map']); //remove visitors map return $vendor_dashboard_widget; }Let us know if you have any further query.
-
AuthorPosts
