Before I write a custom plugin or modify the texty plugin Thought i would reach out and see if this is a feature y’all may want to intergrate. Twilio has a lookup API to verify if the number is a landline or mobile number, it would be cheaper to pay the $0.005 per lookup than to send an undeliverable message.
I linked to the post from twilio explaining it, also here is the code I am about to test to add verification to the phone number but should work directly in your plugin as well. I look forward to your reply, thank you!
<?php
/**
* twilio_lookup.php
*/
require 'vendor/autoload.php';
use Twilio\Rest\Client;
function is_mobile_number($phone_number) {
$sid = 'YOUR_TWILIO_ACCOUNT_SID';
$token = 'YOUR_TWILIO_AUTH_TOKEN';
$client = new Client($sid, $token);
try {
$number = $client->lookups->v1->phoneNumbers($phone_number)->fetch(["type" => "carrier"]);
return $number->carrier['type'] === 'mobile';
} catch (Exception $e) {
error_log("Error: " . $e->getMessage());
return false;
}
}
// Example usage
$phone_number = '+1234567890';
if (is_mobile_number($phone_number)) {
echo "It's a mobile number.";
} else {
echo "It's not a mobile number.";
}
<?php
/**
* twilio-texty-integration.php
* Plugin Name: Twilio Texty Integration
* Description: Integrates Twilio Lookup API with Texty plugin to filter landlines.
* Version: 1.0
* Author: Your Name
*/
function filter_landline_numbers($phone_number) {
require_once 'path/to/twilio_lookup.php';
return is_mobile_number($phone_number);
}
function custom_send_sms($message, $phone_number) {
if (filter_landline_numbers($phone_number)) {
// Call the original Texty send function
texty_send_sms($message, $phone_number);
} else {
error_log("The number $phone_number is not a mobile number.");
}
}
add_action('texty_send_sms', 'custom_send_sms', 10, 2);
]]>
Please consider adding a Dokan Vendor message option for ON HOLD and CANCELED orders
In my system I only capture a payment using Stripe and set the order to On Hold until the order is confirmed or past 24 hours.
Ideally i would like to notify the Vendor by SMS that the Order is ON HOLD and that the order should be then processed, cancelled or processed after 24 hrs.
]]>Can we use this plugin to send messages using Twilio’s custom Alpha Sender ID’s or is it only limited to long phone numbers?
]]>Hi, I understand the fees from the actual SMS provider but it this plugin free? Or is there a pro plugin required for certain features?
]]>Is there a patch available for this issue?
]]>I’ve installed and configured the plugin. Test SMSs work fine.
However, there is no SMS opt-in being added to my check out page. Am I missing a step somewhere to enable that?
]]>is it compactible to digimiles india sms gateway? if not is it possible to integrate?
also is it possible to generate whatsapp messages.
]]>Hello, I wanted to know if it was possible to make Texty work with all woocommerce emails, currently it only works with order completed, processing and waiting messages. I would like it to take all those that appear in the woocommerce email section.
]]>Hello,
The customer receives SMS but the admin does not.
Please help
Thank you
Hello
Is it possible to add sending Whatsapp messages. I researched and for twilio, it is the same api, you are writing whatsapp: in front of to/from phones. But your function only has to&message body variables. Is it possible to add from attribute to the function too. It seems there is no extra step for sending WhatsApp messages. Here is the link a twilio worker explains how to do it:
https://stackoverflow.com/questions/64939889/does-twilio-allow-me-to-send-a-message-for-a-specific-numbergrabbed-from-my-wor
Thanks for the plugin.
How can I send sms on my own plugin or theme’s function.php file using texty plugin? Which function should I call and should I include anything before using your function?
Hello, Please i just connected my test vonage account with texty, and i used the test section on the texty platform to send messages to confirm if it’s connected and i got sms messages directly while using the test section on texty. But when i ordered on woocomerce even though i,ve activated all the notification section on texty as regrds woocommerce and dokan, customers still don’t receive sms of their orders. please i need help as regards this. It looks like my woocomerce and texty didn’t seem to connect
]]>Is it possible to add additional custom events?
e.g welcome message to new customers/vendors
Thank you
]]>Hi,
I use a plugin work for get ETA information. but it short code not work with our plugin.
The plugin name is “Estimate delivery date for Woocommerce Pro”.
I asked developer from that plugin, they tell me:
our plugin stores the estimate date in the order meta data, and your SMS plugin will be having a way to show custom meta data in the SMS
So ask them how to show custom meta data in the SMS
our plugin stores the estimate date in this meta variable
pi_overall_estimate_max_date => this stores the max estimate date of the order
pi_overall_estimate_min_date => this stores the min estimate date of the order
so they can tell how to show this variable data in there SMS`
Please help me, I really like your plugin, it work so great! If I can add ETA to customer SMS, then it is perfect!
Waiting for your reply
Best regards
]]>Hi to all,
I am using Dokan with Texty, working fine.
is it possible to we have in sms body vendor name, as variable example {vendor}
or something like that.
Thanks,
Boki
Is there a way for each of the different Dokan vendors have their own texty connections so they can get new order notifications for only their shop?
]]>I will need to know of there is a way to add the Subtotal amount via variable inside the text message responses. The only variable related to any dollar amount is the total {order_total} which includes taxes an service fees. I want to display only the core price without the extras.
Please advise.
]]>I’d like to set it up so that it notifies the Vendor when payment is received i.e. when the Order Status is “New”.
Is this easily changeable within the plugin?
Second question, what happens if the vendor hasn’t updated their contact number?
Regards,
Indran
Hello, I only sell in México, is there any way to, by default add the country code before de phone. Most of the users does’t know the country code. Thanks
]]>Hello,
I am using Twilio for sending SMS, but I would like to add the Sender ID instead of the number. On Twilio Dashboard is everything ready and working but when i am creating a test from your plugin it still sends through the number and not through the Alphanumeric Sender ID.
I tried to change the plugin a little, but I am receiving an error that there is no “from” number on the settings.
Could you please help me on it?
]]>Hi,
So have been looking for a SMS solution for my Dokan Pro marketplace, and Texty is exactly what I am after! It works perfectly.
Just the one thing that I have an issue with is when a user creates an account they are asked for their phone number (as standard from WordPress). But this phone number is not then added to their account details under “Phone Number (Texty)”. As can be seen here: https://snipboard.io/a1Orkg.jpg
Which means that when they make a comment on a post they do not receive a SMS about it, beacuse there is no phone number under the “Texty” section on their account.
P.S The “Phone Number (Texty)” can only be added from the admin dashboard, meaning customers/vendors can not add their number manually.
Is this a bug, or am I missing something?
Thank you very much, and well done on the plugin, it works really well.
]]>