VeronaLabs specializes on WordPress plugin development and has integrated sms77 into their popular plugin WordPress SMS. The free version supports a lot of functionality already and is enough for most scenarios. The paid version offers even more functionality for a fair price.
Functionalities
- SMS on new WordPress update
- SMS on user registration
- SMS on new comments
- SMS on user login
- Supports other plugins such as Contact form 7, WooCommerce and Easy Digital Downloads
- Supports WP Widget for newsletter subscribers
- Supports WP hooks
- Supports the REST API
- Subscribers import/export
- … and much more!
- … and even more in the pro version
Installation
- Download the latest version as a *.zip from GitHub
- Unzip the archive to
/wp-content/plugins/
- Enable the plugin via the ‘Plugins’ menu item in WordPress
Usage Example
Send SMS manually
$to = ['mobile number'];
$text = "The desired message content";
$asFlash = true; // Defines if the message should be sent as a flash SMS.
wp_sms_send( $to, $text, $asFlash );
Actions
Actions define what should happen additionally when another function is being called.
wp_sms_send
Example: Send an additional email when sending SMS:
function send_mail_on_sms_dispatch($message_info) {
wp_mail('recipient@ma.il', 'SMS dispatch', $message_info);
}
add_action('wp_sms_send', 'send_mail_on_sms_dispatch');
Filters
By using filters we can modify the submitted function parameters.
wp_sms_from
Example: Prefix the German country code to the sender ID:
function wp_sms_modify_sender($from) {
return '+49' . $from;
}
add_filter('wp_sms_from', 'wp_sms_modify_sender');
wp_sms_msg
Example: Append a signature to outgoing message:
function wp_sms_attach_signature($message) {
return $message . ' /n Warm regards from sms77';
}
add_filter('wp_sms_msg', 'wp_sms_attach_signature');