Invite the customer to the gCal Event of the purchased appointment

Issue #559 new
Valentina R created an issue

Proposed here.

Comments (5)

  1. Valentina R reporter

    A user managed to get this done by using the ‘woocommerce_appointments_gcal_sync’ filter with data[‘attendees’] but now the customer gets invited twice - once for the global and once for the staff calendar. Can we add the calendar_id param to the ‘woocommerce_appointments_gcal_sync’ filter so that one can only edit info for a specific calendar?

    Requested here.

  2. Valentina R reporter

    FYI, here is the code snippet to add the customer as an attendee:

    add_filter( 'woocommerce_appointments_gcal_sync', function( $data, $appointment ) {
    
        $order = $appointment->get_order();
    
        $data['attendees'] = [
            [                               
                  'email' => rawurldecode($order->billing_email),                               
                  'responseStatus' => 'accepted',                         
            ]
        ];
    
        return $data;
    
    }, 10, 2);
    

  3. Log in to comment