- This topic has 5 replies, 3 voices, and was last updated 3 years, 1 month ago by
kevajo.
-
AuthorPosts
-
-
March 15, 2023 at 3:54 PM #189339
kevajo
Participant1) Display the order and sub-order number side by side (200-201) in the commission table.
Here is the old code on wcmp but it no longer works on MX:
// displays under order and order in commission
add_action(‘manage_pages_custom_column’,’new_wcmp_register_custom_columns’, 1, 2);
function new_wcmp_register_custom_columns($column_name, $id){
global $WCMp,$woocommerce;
$sub_order_id = get_post_meta($id, ‘_commission_order_id’, true);
$order = wc_get_order($sub_order_id);
$parents_order_id = wp_get_post_parent_id($sub_order_id);
switch ($column_name) {
case ‘_commission_order_id’:
$edit_url = ‘post.php?post=’ . $parents_order_id . ‘&action=edit’;
echo ‘#’ . $parents_order_id . ‘ – ‘;
break;
}
}2 )
We also want to remove the Multivendor X ad on the side because it completely reduces the space in our different tabs.
I remind you that we use the pro version, so this ad does not bring us anything.Thank you for helping us
-
March 15, 2023 at 7:51 PM #189348
Sangita Support Squad
KeymasterThe team is looking into the matter . Kindly provide them some time.
-
March 15, 2023 at 8:02 PM #189349
kevajo
Participantokay
-
March 17, 2023 at 5:32 PM #189484
NerdySupportExpert Moumita
KeymasterHi Kevajo, our replies are inline :
1) Display the order and sub-order number side by side (200-201) in the commission table.
>> Add this code in the function.php of the themeadd_filter('mvx_commissions_table_columns_data', 'change', 10, 2); function change( $commission_list, $commission_value ){ $suborder_id = get_post_meta($commission_value, '_commission_order_id', true); $parents_order_id = wp_get_post_parent_id($suborder_id); $suborder_edit_url = 'post.php?post=' . $suborder_id . '&action=edit'; $parents_order_edit_url = 'post.php?post=' . $parents_order_id . '&action=edit'; $commission_list['order_id'] = '<a href="' . esc_url($parents_order_edit_url) . '">#' . $parents_order_id . '</a>' . '-' . '<a href="' . esc_url($suborder_edit_url) . '">' . $suborder_id . '</a>'; return $commission_list; }2 )
We also want to remove the Multivendor X ad on the side because it completely reduces the space in our different tabs.>> We will remove this in our next update.
-
March 17, 2023 at 5:36 PM #189486
kevajo
Participantthank you
-
March 17, 2023 at 5:47 PM #189489
kevajo
ParticipantYou can close it works
-
-
AuthorPosts
- The topic ‘Display the order and sub-order number side by side in the commission’ is closed to new replies.






