id = 'rtkt_customer_withdrawal'; $this->customer_email = true; $this->title = __( 'Withdrawal acknowledgement', 'returnkit' ); $this->description = __( 'Sent to the customer immediately after they confirm a withdrawal, with what they submitted and when. EU law requires this acknowledgement: keep it enabled.', 'returnkit' ); parent::__construct(); } /** * Default subject. * * @return string */ public function get_default_subject() { return __( 'We\'ve received your withdrawal {request_number}', 'returnkit' ); } /** * Default heading. * * @return string */ public function get_default_heading() { return __( 'Acknowledgement of your withdrawal', 'returnkit' ); } /** * Send. * * @param Request $request Request. * @return bool */ public function trigger( Request $request ) { $this->setup( $request ); $statement = (array) $request->meta( 'statement', array() ); $this->recipient = ! empty( $statement['email'] ) ? $statement['email'] : $request->email(); $this->extra = array( 'statement' => $statement, 'view_url' => Access::request_url( $request, true ), ); return $this->dispatch(); } }