Forum Replies Created
-
Hello,
Do you still need to show the Groups as a column in the “Users” page?Makes perfect sense!
Thank you very much for this help, You helped me a great deal here. Really appreciate it and hope to learn better php so that I could also understand and be able to extend wordpress and plugins soon 🙂
Should I mark this as resolved and make a new post on making a custom column which is not related to the orders post type filterable (or in the worst case sortable)?
Very nice kailanw, thank you very much!
The column show an arrow for sorting but for some reason it doesn’t really sort, just mixes the order when I click on the column name, any idea why?
Another small thing, how would you go about showing the group name instead of ID?
I have this for showing the name on the users list page of admin:function cac_column_meta_value_group_name( $value, $object_id, $column ) { $custom_field_key = 'field_reg_groups'; if ( 'column-meta' == $column->get_type() && $custom_field_key == $column->get_field() && $value ) { // Value is a group ID here if( $group = groups_get_group( array( 'group_id' => $value ) ) ){ $value = $group->name; } } return $value; } add_filter( 'cac/column/meta/value', 'cac_column_meta_value_group_name', 10, 3 );Hope to be able to achieve the same for the orders page (you helped a lot!!!).
Is it possible to achieve a filter option for this field in the orders list?