/** * Send an SMS from the edit order page * * @since 1.1.4 */ public function send_order_sms() { $this->verify_request($_POST['security'], 'wc_twilio_sms_send_order_sms'); // sanitize message $message = sanitize_text_field($_POST['message']); $order_id = is_numeric($_POST['order_id']) ? absint($_POST['order_id']) : null; if (!$order_id) { return; } $notification = new WC_Twilio_SMS_Notification($order_id); // send the SMS $notification->send_manual_customer_notification($message); exit(__('Message Sent', WC_Twilio_SMS::TEXT_DOMAIN)); }