Skip to content

Commit

Permalink
Remove purchaser name as independent field.
Browse files Browse the repository at this point in the history
  • Loading branch information
joedolson committed Dec 26, 2023
1 parent 8cf89ab commit 19c8bb4
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions src/mt-reports.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,21 +94,18 @@ function mt_column_headers_events( $context = 'purchases', $type = 'table' ) {
'mt-seqid' => array(
'label' => __( 'Sequential ID', 'my-tickets' ),
),
'mt-type' => array(
'label' => __( 'Ticket Type', 'my-tickets' ),
),
'mt-purchaser' => array(
'label' => __( 'Purchaser', 'my-tickets' ),
'mt-last' => array(
'label' => __( 'Last Name', 'my-tickets' ),
),
'mt-first' => array(
'label' => __( 'First Name', 'my-tickets' ),
),
'mt-last' => array(
'label' => __( 'Last Name', 'my-tickets' ),
),
'mt-post' => array(
'label' => __( 'Purchase ID', 'my-tickets' ),
),
'mt-type' => array(
'label' => __( 'Ticket Type', 'my-tickets' ),
),
'mt-price' => array(
'label' => __( 'Price', 'my-tickets' ),
),
Expand Down Expand Up @@ -261,7 +258,8 @@ function mt_generate_report_by_event( $event_id = false, $return = false ) {
$table_top = "<table class='widefat'><caption>%caption%</caption>
<thead>
<tr>
<th scope='col' class='mt-purchaser'>" . __( 'Purchaser', 'my-tickets' ) . "</th>
<th scope='col' class='mt-last'>" . __( 'Last Name', 'my-tickets' ) . "</th>
<th scope='col' class='mt-first'>" . __( 'First Name', 'my-tickets' ) . "</th>
<th scope='col' class='mt-type'>" . __( 'Type', 'my-tickets' ) . "</th>
<th scope='col' class='mt-tickets'>" . __( 'Tickets', 'my-tickets' ) . "</th>
<th scope='col' class='mt-owed'>" . __( 'Owed', 'my-tickets' ) . "</th>
Expand Down Expand Up @@ -632,7 +630,8 @@ function mt_purchases( $event_id, $options = array( 'include_failed' => false )
$owed = $subtotal - $paid;
$alternate = ( 'alternate' === $alternate ) ? 'even' : 'alternate';
$row = "<tr class='$alternate'>
<th scope='row' class='mt-purchaser'>$last_name, $first_name</th>
<th scope='row' class='mt-last'>$first_name</th>
<td class='mt-first'>" . $first_name . "</td>
<td class='mt-type'>" . wpautop( $types ) . "</td>
<td class='mt-tickets'>$ticket_count</td>
<td class='mt-price'>" . apply_filters( 'mt_money_format', $owed ) . "</td>
Expand Down Expand Up @@ -730,9 +729,6 @@ function mt_get_report_data( $type, $purchase_id, $ticket_id, $ticket ) {
case 'mt-type':
$value = mt_get_label( $ticket['type'] );
break;
case 'mt-purchaser':
$value = get_the_title( $purchase_id );
break;
case 'mt-first':
$first = get_post_meta( $purchase_id, '_first_name', true );
if ( ! $first ) {
Expand Down

0 comments on commit 19c8bb4

Please sign in to comment.