Optimize SMS Recipients with ‘wp_sms_to’

Updated on Jan 09, 2023

Overview

The WP SMS plugin includes a filter called “wp_sms_to” that allows you to modify the receiver’s phone number for SMS messages sent through the plugin. This filter can be useful if you want to customize the phone numbers that messages are sent to, or if you want to add additional recipients to the messages.

Example:

Add a new number to get the message.

function wp_sms_modify_receiver($numbers) {
	$numbers[] = '11xxxxxxxx';
	
	return $numbers;
}
add_filter('wp_sms_to', 'wp_sms_modify_receiver');