id = 'rtkt_customer_link'; $this->customer_email = true; $this->title = __( 'Returns portal link', 'returnkit' ); $this->description = __( 'Sent to a customer who looks up their order in the returns portal, with a secure link to it.', 'returnkit' ); parent::__construct(); } /** * Default subject. * * @return string */ public function get_default_subject() { return __( 'Your link to return items from order #{order_number}', 'returnkit' ); } /** * Default heading. * * @return string */ public function get_default_heading() { return __( 'Return items from your order', 'returnkit' ); } /** * Send. * * @param \WC_Order $order Order. * @return bool */ public function trigger( \WC_Order $order ) { $this->setup_locale(); $this->object = $order; $this->request = null; $this->recipient = $order->get_billing_email(); $this->placeholders['{order_number}'] = $order->get_order_number(); $this->extra = array( 'link' => Access::return_url( $order, true ) ); return $this->dispatch(); } }