Hi @ycv005,
Thank you for contacting us, please add the below-shared code in your themes functions.php file.
add_filter( 'mycred_log_column_headers', 'customize_mycred_log_table_headers', 10, 3 );
function customize_mycred_log_table_headers( $headers, $obj, $is_admin ) {
$headers['creds'] = 'Earning Status';
$headers['entry'] = 'Records';
return $headers;
}
Thread Starter
ycv005
(@ycv005)
Hi,
sorry I forgot to mention that i have two types of point system, i.e., one is mycred default and another point type is ctype=”cbtrkr_approved_inr”
. So, I want custom heading in point type- ctype=”cbtrkr_approved_inr” and also I want changes in default one. But I think above code is for default one & above code is making change on both point type.
So, how I could achieve different column heading in two type of point type that is default mycred point and ctype=”cbtrkr_approved_inr” point type.
Thanks in advance.
Hi @ycv005,
Please use the code shared below.
add_filter( 'mycred_log_column_mycred_default_headers', 'customize_mycred_log_mycred_default_headers', 10, 3 );
function customize_mycred_log_table_headers( $columns ) {
$columns['creds'] = 'Earning Status Default';
$columns['entry'] = 'Records Default';
return $columns;
}
add_filter( 'mycred_log_column_cbtrkr_approved_inr_headers', 'customize_mycred_log_cbtrkr_approved_inr_headers', 10, 3 );
function customize_mycred_log_table_headers( $columns ) {
$columns['creds'] = 'Earning Status';
$columns['entry'] = 'Records';
return $columns;
}
Thread Starter
ycv005
(@ycv005)
Hi, I have tried this on localhost and its giving an error. I have made a video to better understand the case.
Video – Link
Also, one more thing to tell you that earlier(top-most) code that you have given us. At the wp-admin dashboard, it was showing some error(we use wp-debugging plugin that shows possible errors), kindly look at image(link)
Thanks in advance.
Hi,
Please use the updated code shared below.
add_filter( 'mycred_log_column_mycred_default_headers', 'customize_mycred_log_mycred_default_headers' );
function customize_mycred_log_mycred_default_headers( $columns ) {
$columns['creds'] = 'Earning Status Default';
$columns['entry'] = 'Records Default';
return $columns;
}
add_filter( 'mycred_log_column_cbtrkr_approved_inr_headers', 'customize_mycred_log_cbtrkr_approved_inr_headers' );
function customize_mycred_log_cbtrkr_approved_inr_headers( $columns ) {
$columns['creds'] = 'Earning Status';
$columns['entry'] = 'Records';
return $columns;
}
Thread Starter
ycv005
(@ycv005)
Hi,
I have tried above code after updating mycred plugin but this time we didn’t get any error but nothing changes on column header.
If you want to check i can give you our site admin details too.
Hi @ycv005,
Our technical team needs some more info your side please open a support ticket at our official website.
Thanks!