MultivendorX Pro
-
AuthorPosts
-
-
March 15, 2023 at 3:54 PM #189339kevajoParticipant
1) 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 #189348Sangita Support SquadKeymaster
The team is looking into the matter . Kindly provide them some time.
-
March 15, 2023 at 8:02 PM #189349kevajoParticipant
okay
-
March 17, 2023 at 5:32 PM #189484NerdySupportExpert MoumitaKeymaster
Hi 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; }
Copy2 )
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 #189486kevajoParticipant
thank you
-
March 17, 2023 at 5:47 PM #189489kevajoParticipant
You 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.