• Resolved eventaus

    (@eventaus)


    Hi,

    When I export the registration list in .csv. It is showing registration ID. However the registration id is not the order id.

    What is the registration id?

    How can I make it show order id instead?

    Kind Regards

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Rita Kikani

    (@kikanirita)

    Hi @eventaus ,

    In registration csv file the registration id is not order id. When any one order or register in your event, at that time registration would be added for that user and you can see all registered user data in your admin panel -> Event Registrations -> All Registrations. So, basically in your csv file you are getting this registration id.

    Howevenr, you can add order id in your csv file using hook. For that you need to add below code in your theme functions.php file.

    function wpem_registration_dashboard_csv_header( $row_header ) {
    	$row_header[] = __('Order Id', 'wp-event-manager-sell-tickets');
    	return $row_header;
    }
    add_filter('event_registration_dashboard_csv_header', 'wpem_registration_dashboard_csv_header', 99, 1);
    
    function wpem_registration_dashboard_csv_row_value($row_value, $registration_id) {
     $order_id = get_post_meta($registration_id, '_order_id', true);
     
     return $order_id;
    }
    add_filter('event_registration_dashboard_csv_row_value', 'wpem_registration_dashboard_csv_row_value', 99, 2);

    I hope this would be helpful to resolve your query. If you need any further guidance or have nay another query, feel free to ask.

    Thank you.

    Thread Starter eventaus

    (@eventaus)

    Hi, Thank you.

    When I search using registraion id in the backend, nothing is shown

    Plugin Author Rita Kikani

    (@kikanirita)

    Hi @eventaus ,

    you will find the registrations as shown in below screenshot : https://tinyurl.com/yut5ex94

    Thread Starter eventaus

    (@eventaus)

    Hi,

    When I use the above snippet,

    I get the following error

    Under Registration ID:

    
    <b>Warning</b>:? array_map(): Expected parameter 2 to be an array <br /> <b>Warning</b>:? implode(): Invalid arguments passed in <b>/home/customer/www/eventik.com.au/public_html/wp-content/plugins/wp-event-manager-registrations/includes/wp-event-manager-registrations-dashboard.php</b> on line <b>257</b><br />
    
    

    Under Registration date

    ?string given in <b>/home/customer/www/eventik.com.au/public_html/wp-content/plugins/wp-event-manager-registrations/includes/wp-event-manager-registrations-dashboard.php</b> on line <b>255</b><br />

    Plugin Author Rita Kikani

    (@kikanirita)

    Hi @eventaus ,

    Please replace above code with below code.

    function wpem_registration_dashboard_csv_header( $row_header ) {
    	$row_header[] = __('Order Id', 'wp-event-manager-sell-tickets');
    	return $row_header;
    }
    add_filter('event_registration_dashboard_csv_header', 'wpem_registration_dashboard_csv_header', 99, 1);
    
    function wpem_registration_dashboard_csv_row_value($row_value, $registration_id) {
     $row_value['order_id'] = get_post_meta($registration_id, '_order_id', true);
     
     return $row_value;
    }
    add_filter('event_registration_dashboard_csv_row_value', 'wpem_registration_dashboard_csv_row_value', 99, 2);
    Thread Starter eventaus

    (@eventaus)

    Hi

    I am still not getting the order id,

    Is it because I already have this snippet running

    //Buyers Phone number wp
    function wpem_registration_dashboard_csv_header( $row_header ) {
    $row_header[] = __(‘Buyer\’s Phone’, ‘wp-event-manager-sell-tickets’);
    return $row_header;
    }
    add_filter(‘event_registration_dashboard_csv_header’, ‘wpem_registration_dashboard_csv_header’, 99, 1);

    function wpem_registration_dashboard_csv_row_value($row_value, $registration_id) {
    $order_id = get_post_meta($registration_id, ‘_order_id’, true);
    try {
    $order = new WC_Order($order_id);
    array_push($row_value, $order->get_billing_phone());

    } catch (Exception $e) {
        echo 'Invalid order id';
    }
    return $row_value;

    }
    add_filter(‘event_registration_dashboard_csv_row_value’, ‘wpem_registration_dashboard_csv_row_value’, 99, 2);

    Thread Starter eventaus

    (@eventaus)

    Hi,

    I am still having issues getting the order when I am running that biller phone number snippet already implemented.

    How can I implement both snippets? Also how do change the placement of the coloumn to say 2nd or 4th column

    thank you

    Plugin Author Rita Kikani

    (@kikanirita)

    Hi @eventaus ,

    you just need to add both the column and value in one hook only, you don’t need to add 2-2 hook for both.

    For ordering,you need to add your all fields(columns) as per your order in first hook.

    Thank you.

    Thread Starter eventaus

    (@eventaus)

    Thank you,

    How do I manage the order of the column in excel?

    Plugin Author Rita Kikani

    (@kikanirita)

    Hi,

    You just need to open support ticket for premium addon query and issue. So, please open support ticket on our support site.

    Thank you.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Registration ID showing incorrect’ is closed to new replies.