Option to auto-confirm appointments created in admin

Issue #676 resolved
Valentina R created an issue

It would be great if we could get this into core as some stores schedule appointments for their clients and they need their clients to pay for the orders - which confirming teh appointment allows by sending the confirmation email.

If not possible, a code snippet is welcome.

Requested here and here.

Comments (2)

  1. Željan Topić

    They can use this code snippet:

    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;
    }
    
  2. Log in to comment