AMELIA_USER_APPOINTMENT_BOOKED::setup_trigger()

Define and register the trigger by pushing it into the Automator object


Source Source

File: src/integrations/ameliabooking/triggers/amelia-user-appointment-booked.php

	public function setup_trigger() {

		$this->set_integration( 'AMELIABOOKING' );
		$this->set_trigger_code( self::TRIGGER_CODE );
		$this->set_trigger_meta( self::TRIGGER_META );
		$this->set_is_login_required( true );

		/* Translators: Trigger sentence */
		$this->set_sentence( esc_html__( 'A user books an appointment', 'uncanny-automator' ) );

		/* Translators: Trigger sentence */
		$this->set_readable_sentence( esc_html__( 'A user books an appointment', 'uncanny-automator' ) ); // Non-active state sentence to show

		$this->add_action( 'AmeliaBookingAddedBeforeNotify' ); // which do_action() fires this trigger

		$this->register_trigger(); // Registering this trigger

	}