products ) { return; } $current_time = current_time('timestamp'); // check if the date has been passed // if so, hide the edit button if ( $current_time > $appointment->timestamp ) { return; } if ( !$appointment->calendar ) { return; } $calendar_link = $appointment->calendar->calendar_link; if ( !$calendar_link ) { return; } $calendar_link = esc_url(add_query_arg(array( 'app_id' => $appointment_id, 'app_action' => 'edit', 'source' => 'booked_wc_extension' ), $calendar_link)); if ( !$appointment->is_paid && $appointment->payment_status == 'awaiting_checkout' ): ?> timestamp); $timeslots = explode('-',$appointment->timeslot); $appt_date_time = strtotime($date_to_convert.' '.date_i18n('H:i:s',strtotime($timeslots[0]))); if ( $appt_date_time >= $date_to_compare) { if (!$appointment->is_paid || $appointment->is_paid && $appointment->order_id == 'manual'){ echo ''.__('Cancel Appointment','booked-woocommerce-payments').''; } } }