Untitled
unknown
plain_text
2 years ago
591 B
4
Indexable
add_action('b2bking_b2bcustomers_column_header', function(){ echo '<th>Phone Number</th>'; }); add_action('b2bking_b2bcustomers_column_footer', function(){ echo '<th>Phone Number</th>'; }); add_filter('b2bking_b2bcustomers_row_content', function($row, $user_id){ $phone = get_user_meta($user_id,'billing_phone', true); if (empty($phone)){ $phone = get_user_meta($user_id,'shipping_phone', true); if (empty($phone)){ $phone = '-'; } } $column = '<td>'.$phone.'</td>'; if (is_array($row)){ array_push($row, $phone); } else { $row.=$column; } return $row; }, 10, 2);
Editor is loading...