SMS & MMS Notifications, 2FA, OTP, and Integrations with E-Commerce and Form Builders. Send messages through 200+ gateways including Twilio, Plivo, Clickatell, BulkSMS, Infobip, Vonage (Nexmo), Messagebird, ClickSend and more. See all gateways
$to = ['01000000000'];
$msg = "Hello World!";
wp_sms_send($to, $msg);$mediaUrls = ['https://yoursite.com/image.png'];
wp_sms_send($to, $msg, false, false, $mediaUrls);- 200+ SMS gateway integrations (full list)
- Send SMS/MMS to phone numbers, subscribers, and WordPress users
- SMS newsletter subscription with activation codes
- Notification SMS for new posts, WordPress updates, new users, comments, and logins
- WooCommerce, Contact Form 7, and Easy Digital Downloads integrations
- Newsletter subscriber widget
- WordPress Hooks and WP-REST API support
- Subscriber import/export
This is the development (pre-build) version. For the latest stable release, visit the WordPress Plugin Directory.
git clone git@github.com:veronalabs/wp-sms.git
cd wp-sms
composer installpnpm install
pnpm buildpnpm devwp_sms_send - Fires when an SMS is sent.
function send_mail_when_send_sms($message_info) {
wp_mail('you@mail.com', 'Send SMS', $message_info);
}
add_action('wp_sms_send', 'send_mail_when_send_sms');wp_sms_add_subscriber - Fires when a new subscriber is added.
function send_sms_when_subscribe_new_user($name, $mobile) {
$to = [$mobile];
$msg = "Hi {$name}, Thanks for subscribing.";
wp_sms_send($to, $msg);
}
add_action('wp_sms_add_subscriber', 'send_sms_when_subscribe_new_user', 10, 2);wp_sms_from - Modify the sender number.
function wp_sms_modify_from($from) {
return $from . ' 0';
}
add_filter('wp_sms_from', 'wp_sms_modify_from');wp_sms_to - Modify receiver numbers.
function wp_sms_modify_receiver($numbers) {
$numbers[] = '09xxxxxxxx';
return $numbers;
}
add_filter('wp_sms_to', 'wp_sms_modify_receiver');wp_sms_msg - Modify the message text.
function wp_sms_modify_message($message) {
return $message . "\nPowered by: WSMS";
}
add_filter('wp_sms_msg', 'wp_sms_modify_message');composer distCreates dist/wp-sms.zip, excluding files listed in .distignore.
Prerequisites: composer install --no-dev and pnpm build before creating the ZIP.
WSMS is translated into many languages. See the translate page for details.
