Missing filter (5-minute task)

Issue #974 resolved
Valentina R created an issue

Reported here.

The filter below should be added to the code in the screenshot.

add_action( 'woocommerce_appointment_cancelled', array( $this, 'remove_from_gcal' ) );

This user doesn’t want cancelled appointment to be removed from cart and if he uses this filter, it works when it’s cancelled, but not when manually edited by the admin. In this case, the code in the screenshot fires and removes the event from gCal.

Comments (3)

  1. Valentina R reporter
    • changed status to open

    Yes, the filter exists but it should be added to line 709 in file class-wc-appointments-gcal.php. Because without it the calendar gets removed from gCal when the appointment is canceled.

  2. Željan Topić

    Added filter 'woocommerce_appointments_gcal_remove_from_gcal' with 4.16.2.

    By default, it will work the same as before since removal from Google calendar is on purpose for cancelled appointments.

  3. Log in to comment