Online PHP and Javascript Decoder decode hidden script to uncover its real functionality


namespace Attendees;

class Columns
{
    public function __construct()
    {
        add_filter('tribe_tickets_attendee_table_columns', [$this, 'returnColumnHeaders'], 10, 1);
        add_filter('tribe_events_tickets_attendees_table_column', [$this, 'returnColumnData'], 10, 3);
    }
    public function returnColumnHeaders($event_id)
    {
        $columns = [
            'cb' => '<input type="checkbox" />',
            'primary_info' => esc_html_x('Attendee Information', 'attendee table', 'event-tickets'),
            'ticket' => esc_html(tribe_get_ticket_label_singular('attendee_table_column')),
            'status' => esc_html_x('Status', 'attendee table', 'event-tickets'),
            'email-address' => esc_html_x('Attendee Email', 'attendee table', 'event-tickets'),
            'phone' => esc_html_x('Attendee Phone', 'attendee table', 'event-tickets'),
            'fee' => esc_html_x('Fee', 'attendee table', 'event-tickets'),
            'feeaddon' => esc_html_x('Add-ons fee', 'attendee table', 'event-tickets'),
            'active-past' => esc_html_x('Active/Past event', 'attendee table', 'event-tickets'),
            'dietary-requirements' => esc_html_x('Dietry Requirements', 'attendee table', 'event-tickets'),
            'drivers-licence-number' => esc_html_x('Licence Number', 'attendee table', 'event-tickets'),
            'drivers-licence-expiry' => esc_html_x('Licence Expiry', 'attendee table', 'event-tickets'),
            'last-update' => esc_html_x('Last update', 'attendee table', 'event-tickets'),
        ];
        if (!is_admin()) {
            $columns = \Tribe__Main::array_insert_after_key(
                'ticket',
                $columns,
                ['security' => esc_html_x('Security Code', 'attendee table', 'event-tickets')]
            );
        }
        $attendees = tribe('tickets.attendees');
        if ($attendees->user_can_manage_attendees(0, $event_id)) {
            $columns['check_in'] = esc_html_x('Check in', 'attendee table', 'event-tickets');
        }
        return $columns;
    }
    public function returnColumnData($value, $item, $column)
    {
        $value = '';
        if ($column == 'last-update' && isset($item['order_id_display'])) {
	    $post = get_post($item['attendee_id']);
	    // get_option( 'date_format' ) get_option( 'time_format' )
            $value = $post->post_modified;
        } else if ($column == 'fee' && isset($item['order_id_display'])) {
            $value = get_woocommerce_currency_symbol() . number_format(get_post_meta($item['order_id_display'], '_order_total', true), 2);
        } else if ($column == 'active-past' && isset($item['event_id'])) {
            $end = strtotime(get_post_meta($item['event_id'], '_EventEndDate', true));
            $now = strtotime('now');
            $value = ($now < $end) ? 'active' : 'past';
        } else if (!empty($item['attendee_meta'][$column]['value'])) {
            $value = $item['attendee_meta'][$column]['value'];
        }
        return $value ?: '-';
    }
}



© 2023 Quttera Ltd. All rights reserved.