Backend appointment gCal sync

Create issue
Issue #328 resolved
Valentina R created an issue

Use this snippet to sync unpaid appointments.

add_filter( 'woocommerce_appointments_gcal_sync_statuses', 'gcal_sync_unpaid_statuse' );
function gcal_sync_unpaid_statuse( $sync_statuses ) {
//* Sync with unpaid appointments
array_push( $sync_statuses, 'unpaid' );

return $sync_statuses;

Add an appointment through the dashboard. The appointment is not synced to gCal. You have to open and save the appointment in order for it to sync with gCal.

Reported here:

Comments (6)

  1. Željan Topić

    This is on purpose, so appointments created in admin don't automatically send emails to customers that their appointment has been confirmed and they need to pay for it.

    Alternatively, when order isn't associated with appointments created in admin, appointment is automatically synced to gCal.

  2. Mateusz Solecki

    Is there a way to override this with some code?

    So unpaid appointment created from the backend does sync immediately?

  3. Željan Topić

    @tpmateusz Yes, with the code snippet Valentina added here. Otherwise, would you also like to send confirmation email notification to customer when appointment is added in admin?

  4. Mateusz Solecki

    I have this snippet in my funcions.php, and it behaves the way I reported in the forum and Valentina described here.

    I would like to have it sync and send an email when it's created (without having to open and save it).

  5. Željan Topić

    I've now added a new filter in 3.7.0, so you'll be able to achieve what you want with the snippet below:

    add_filter( 'woocommerce_appointments_create_appointment_args', 'create_new_admin_appointment_status', 10, 2 );
    function create_new_admin_appointment_status( $arguments, $new_appointment_data ) {
      $arguments['status'] = 'confirmed';
      return $arguments;
  6. Log in to comment