WSMS (formerly WP SMS): SMS Notifications, OTP Login and WooCommerce SMS 7.2.15 has 22 actions and 122 filters, read directly from its source code on Nov 20, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when WSMS (formerly WP SMS): SMS Notifications, OTP Login and WooCommerce SMS fires an action
add_action( 'wp_sms_send', function( $response ) {
// Your code runs here.
}, 10, 1 );
// Change a value WSMS (formerly WP SMS): SMS Notifications, OTP Login and WooCommerce SMS is about to use
add_filter( 'wp_sms_from', function( $from ) {
// Change $from here.
return $from;
}, 10, 1 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
Changes by version
7.2.14 → 7.2.15 · Nov 20, 2026 · 0 added, 0 removed
No hooks were added or removed in this release.
All hooks
-
/** * Run hook after send sms. */ do_action( 'wp_sms_send', $response ); -
/** * Modify sender number */ apply_filters( 'wp_sms_from', $this->from ); -
/** * Modify text message */ apply_filters( 'wp_sms_msg', $this->msg ); -
/** * Modify Receiver number */ apply_filters( 'wp_sms_to', $this->to ); -
/** * This filter is documented in src/Helper.php */ apply_filters( 'wp_sms_mobile_numbers_query_args', $args ); -
/** * This filter is documented in src/BackgroundProcess/SmsDispatcher.php */ apply_filters( 'wp_sms_single_dispatch_arguments', $singleArgument ); -
/** * Filter to add recipient numbers from add-ons (e.g., WooCommerce, BuddyPress) */ apply_filters( 'wpsms_api_recipient_numbers', $allNumbers, $recipients, $counts ); -
/** * This filter is documented in includes/api/v1/class-wpsms-api-send.php */ apply_filters( 'wpsms_api_repeating_sms_handler', false, $startDate, $endDate, $interval['value'], $interval['unit'], $request->get_param('sender'), $message, $recipientNumbers, $mediaUrls ); -
/** * This filter is documented in includes/api/v1/class-wpsms-api-send.php */ apply_filters( 'wpsms_api_scheduled_sms_handler', false, $request->get_param('schedule'), $request->get_param('sender'), $message, $recipientNumbers, $mediaUrls ); -
/** * Filter the unsubscribe success message. */ apply_filters( 'wpsms_unsubscribe_success_message', $response['message'], $groupIds, $number ); -
/** * Filters the post arguments used during an async request. */ apply_filters( "{$this->identifier}_post_args", $args ); -
/** * Filters the post arguments used during an async request. */ apply_filters( "{$this->identifier}_query_args", $args ); -
/** * Filters the post arguments used during an async request. */ apply_filters( "{$this->identifier}_query_url", $url ); -
/** * Number of seconds to sleep between batches. Defaults to 0 seconds, minimum * 0. */ apply_filters( "{$this->identifier}_seconds_between_batches", apply_filters( $this->prefix . '_seconds_between_batches', 0 ) ); -
/** * Should wp_die be used? */ apply_filters( "{$this->identifier}_wp_die", true ); -
/** * Number of seconds to sleep between batches. Defaults to 0 seconds, minimum * 0. */ apply_filters( "{$this->prefix}_seconds_between_batches", 0 ); -
/** * Run hook after adding group. */ do_action( 'wp_sms_add_group', $result ); -
/** * Run hook after adding subscribe. */ do_action( 'wp_sms_add_subscriber', $name, $mobile, $status, $wpdb->insert_id ); -
/** * Filter to modify message */ apply_filters( 'wp_sms_api_message_content', $message, $request->get_params() ); -
/** * Contact form 7 fields */ apply_filters( 'wp_sms_contact_form7_settings', array( 'cf7_title' => array( 'id' => 'cf7_title', 'name' => esc_html__('SMS Notification Metabox', 'wp-sms'), 'type' => 'header', 'doc' => '/resources/integrate-wp-sms-with-contact-form-7/', 'desc' => esc_html__('By this option you can add SMS notification tools in all edit forms.', 'wp-sms'), ), 'cf7_metabox' => array( 'id' => 'cf7_metabox', 'name' => esc_html__('Status', 'wp-sms'), 'type' => ... ); -
/** * Run hook after deleting group. */ do_action( 'wp_sms_delete_group', $result ); -
/** * Run hook after deleting subscriber. */ do_action( 'wp_sms_delete_subscriber', $deleted_rows ); -
/** * Feature fields */ apply_filters( 'wp_sms_feature_settings', array( 'admin_reports' => array( 'id' => 'admin_reports', 'name' => esc_html__('Administrative Reporting', 'wp-sms'), 'type' => 'header' ), 'report_wpsms_statistics' => array( 'id' => 'report_wpsms_statistics', 'name' => esc_html__('SMS Performance Reports', 'wp-sms'), 'type' => 'checkbox', 'options' => $options, 'desc' => esc_html__('Sends weekly SMS performance statistics to the admin email.'... ); -
/** * Gateway fields */ apply_filters( 'wp_sms_gateway_settings', array( 'gateway_title' => array( 'id' => 'gateway_title', 'name' => esc_html__('SMS Gateway Setup', 'wp-sms'), 'type' => 'header' ), 'gateway_name' => array( 'id' => 'gateway_name', 'name' => esc_html__('Choose the Gateway', 'wp-sms'), 'type' => 'advancedselect', 'options' => self::getGatewayOptionsForLegacySelect(), 'desc' => esc_html__('Select your preferred SMS Gateway to send messages.', 'w... ); -
/** * General fields */ apply_filters( 'wp_sms_general_settings', array( 'admin_title' => array( 'id' => 'admin_title', 'name' => esc_html__('Administrator Notifications', 'wp-sms'), 'type' => 'header' ), 'admin_mobile_number' => array( 'id' => 'admin_mobile_number', 'name' => esc_html__('Admin Mobile Number', 'wp-sms'), 'type' => 'text', 'desc' => esc_html__('Mobile number where the administrator will receive notifications.', 'wp-sms') ), 'mobile_field' => a... ); -
/** * Fire after send sms */ do_action( 'wp_sms_log_after_save', $result, $sender, $message, $to, $response, $status, $media ); -
/** * Message button setting fields */ apply_filters( 'wp_sms_message_button_settings', array( 'chatbox' => array( 'id' => 'chatbox', 'name' => esc_html__('Message Button Configuration', 'wp-sms'), 'type' => 'header', ), 'chatbox_message_button' => array( 'id' => 'chatbox_message_button', 'name' => esc_html__('Message Button', 'wp-sms'), 'type' => 'checkbox', 'options' => $options, 'desc' => sprintf(__('Switch on to display the Message Button on your site or off to hide it. <a hre... ); -
/** * SMS Newsletter fields */ apply_filters( 'wp_sms_newsletter_settings', array( 'newsletter_title' => array( 'id' => 'newsletter_title', 'name' => $this->renderOptionHeader( esc_html__('SMS Newsletter Configuration', 'wp-sms'), esc_html__('Configure how visitors subscribe to your SMS notifications.', 'wp-sms') ), 'type' => 'header', 'doc' => '/resources/add-sms-subscriber-form/' ), 'newsletter_form_groups' => array( 'id' => 'newsletter_form_groups', 'name' => esc_ht... ); -
/** * Filter each order item string before adding to the prepared items. */ apply_filters( 'wp_sms_notification_woocommerce_order_item', $itemString, $orderItemData, $item, $this->order ); -
/** * Notifications fields */ apply_filters( 'wp_sms_notifications_settings', array( 'notif_publish_new_post_title' => array( 'id' => 'notif_publish_new_post_title', 'name' => $this->renderOptionHeader( esc_html__('New Post Alerts', 'wp-sms'), esc_html__('Configure SMS notifications to inform subscribers about newly published content.', 'wp-sms') ), 'type' => 'header' ), 'notif_publish_new_post' => array( 'id' => 'notif_publish_new_post', 'name' => esc_html__('Status', '... ); -
/** * Trigger the custom action after the OTP is generated. */ do_action( 'wp_sms_otp_generated', $generator->getCode(), $this->getPhoneNumber(), $this->getAgent() ); -
/** * Filter to modify arguments */ apply_filters( 'wp_sms_request_arguments', $arguments ); -
/** * Filter to modify params */ apply_filters( 'wp_sms_request_params', $params ); -
/** * Filters the rendered Send SMS form markup. */ apply_filters( 'wp_sms_send_sms_form_html', $html, $attributes ); -
/** * Filter to allow add-ons to append their Site Health integration settings. */ apply_filters( 'wp_sms_site_health_settings', $settings ); -
/** * Run hook after updating group. */ do_action( 'wp_sms_update_group', $result ); -
/** * Run hook after updating subscribe. */ do_action( 'wp_sms_update_subscriber', $result ); -
/** * Filter to register additional recipient types for Send SMS page */ apply_filters( 'wpsms_additional_recipient_types', [] ); -
/** * Filter to allow add-ons to handle their own save logic. */ apply_filters( "wpsms_addon_save_settings_{$addonSlug}", false, $fields, $addonFieldTypes ); -
/** * Filter admin notices shown in the React dashboard. */ apply_filters( 'wpsms_react_admin_notices', $result ); -
/** * Action: wpsms_settings_updated */ do_action( 'wpsms_settings_updated', $changedKeys, $oldValues, $newValues, get_current_user_id() ); -
/** * Filter: wpsms_stats_direction_options Allows addons to add/remove SMS * direction options. */ apply_filters( 'wpsms_stats_direction_options', [ 'send-messages-stats' => __('Sent SMS', 'wp-sms'), ] ); -
apply_filters( 'wp_sms_user_mobile_field', 'mobile' ); -
apply_filters( 'wp_sms_user_mobile_number', '', $userId ); -
apply_filters( 'wpsms_addon_settings_schema', [] ); -
apply_filters( 'wp_sms_otp_rate_limit_count', $this->rateLimitCount ); -
apply_filters( 'wp_sms_otp_rate_limit_time_interval', new DateInterval('PT5M') ); -
apply_filters( 'wpsms_gateway_registry', self::applyMetadataOverrides(self::promoteMovedGateways($cached)) ); -
apply_filters( 'wp_sms_bulk_dispatch_limit', 20 ); -
apply_filters( 'wp_sms_max_per_page', 100 ); -
apply_filters( 'wp_sms_stats_widget_data', [] ); -
do_action( "{$this->identifier}_cancelled" ); -
do_action( "{$this->identifier}_completed" ); -
apply_filters( "{$this->identifier}_default_time_limit", 20 ); -
apply_filters( "{$this->identifier}_memory_exceeded", $return ); -
do_action( "{$this->identifier}_paused" ); -
apply_filters( "{$this->identifier}_queue_lock_time", $lock_duration ); -
do_action( "{$this->identifier}_resumed" ); -
apply_filters( "{$this->identifier}_time_exceeded", $return ); -
apply_filters( "{$this->setting_name}_{$tab}_sanitize", $input ); -
apply_filters( "{$this->setting_name}_sanitize", $value, $key ); -
apply_filters( "{$this->setting_name}_sanitize_{$type}", $value, $key ); -
apply_filters( 'https_local_ssl_verify', false ); -
apply_filters( 'login_redirect', $redirectUrl, $redirectUrl, $user ); -
apply_filters( 'plugin_integrations_tabs', $this->pluginIntegrationsTabs ); -
apply_filters( 'plugin_locale', $locale, 'wp-sms' ); -
apply_filters( 'registration_redirect', $redirectUrl, null ); -
apply_filters( 'sms_to_callback', $this->options['gateway_smsto_callback_url'] ); -
do_action( 'wp_login', $this->user->user_login, $this->user ); -
do_action( "wp_sms_{$this->active_tab}_before_content_render" ); -
apply_filters( 'wp_sms_addon_settings_url', $settingsUrl, $pluginSlug ); -
apply_filters( 'wp_sms_addons', array() ); -
apply_filters( 'wp_sms_admin_notices', $this->coreNotices ); -
apply_filters( 'wp_sms_admin_notify_registration', [$adminMobileNumber] ); -
apply_filters( 'wp_sms_admin_page_list', $adminList ); -
apply_filters( 'wp_sms_anonymized_usage_data', $data ); -
apply_filters( 'wp_sms_api_recipients_numbers', $recipients, $request->get_param('recipients'), $request ); -
apply_filters( 'wp_sms_api_send_sms_arguments', $this->sendSmsArguments ); -
apply_filters( 'wp_sms_as_settings', [] ); -
apply_filters( 'wp_sms_assets_handle', $handle ); -
do_action( 'wp_sms_before_register_notice', $this ); -
do_action( 'wp_sms_before_report_email', $reportData, $content ); -
apply_filters( 'wp_sms_chatbox_contact_link', $linkUrl, $type, $value ); -
apply_filters( 'wp_sms_cron_schedules', $schedules ); -
apply_filters( 'wp_sms_current_timestamp', self::getCurrentDate('U') ); -
apply_filters( 'wp_sms_days_ago_request', 30 ); -
apply_filters( 'wp_sms_enable_upgrade_notice', true ); -
apply_filters( 'wp_sms_formidable_settings', [] ); -
apply_filters( 'wp_sms_forminator_settings', [], $options ); -
apply_filters( 'wp_sms_gateway_select_item_options', [ 'option' => $option, 'name' => $name, 'selected' => $option == $value, 'disabled' => self::isGatewayPremium($option), ] ); -
apply_filters( 'wp_sms_job_settings', [] ); -
apply_filters( 'wp_sms_licenses_settings', array() ); -
apply_filters( "wp_sms_localize_{$handle}", $data ); -
apply_filters( 'wp_sms_mobile_filed_handler', $this->mobileFieldHandler ); -
apply_filters( 'wp_sms_mobile_number_numeric_check', true ); -
apply_filters( 'wp_sms_mobile_number_validity', true, $mobileNumber ); -
apply_filters( 'wp_sms_normalization_source', 'unknown', $to, $message ); -
apply_filters( "wp_sms_notification_woocommerce_order_item_meta_key_{$metaKey}", implode(', ', $itemMetaValues) ); -
apply_filters( "wp_sms_notification_woocommerce_order_meta_key_{$metaKey}", $this->processMetaValue($metaValue) ); -
do_action( 'wp_sms_number_unsubscribed_through_url', $number ); -
apply_filters( "wp_sms_option_{$optionName}", $options[$optionName] ); -
apply_filters( 'wp_sms_output_variables', $this->variables, $message ); -
apply_filters( 'wp_sms_output_variables_message', $finalMessage, $message, $variables ); -
do_action( 'wp_sms_pro_before_content_render' ); -
apply_filters( 'wp_sms_pro_bp_settings', [] ); -
apply_filters( 'wp_sms_pro_edd_settings', [] ); -
apply_filters( 'wp_sms_pro_gf_settings', [] ); -
apply_filters( 'wp_sms_pro_qf_settings', [] ); -
apply_filters( 'wp_sms_pro_um_settings', [] ); -
apply_filters( 'wp_sms_pro_wc_settings', [] ); -
apply_filters( 'wp_sms_pro_wp_settings', [] ); -
apply_filters( 'wp_sms_registered_integration_tabs', [ 'contact_form7' => esc_html__('Contact Form 7', 'wp-sms'), ] ); -
apply_filters( 'wp_sms_registered_settings', array( 'general' => apply_filters('wp_sms_general_settings', array( 'admin_title' => array( 'id' => 'admin_title', 'name' => esc_html__('Administrator Notifications', 'wp-sms'), 'type' => 'header' ), 'admin_mobile_number' => array( 'id' => 'admin_mobile_number', 'name' => esc_html__('Admin Mobile Number', 'wp-sms'), 'type' => 'text', 'desc' => esc_html__('Mobile number where the administrator w... ); -
apply_filters( 'wp_sms_registered_tabs', $tabs ); -
apply_filters( 'wp_sms_registration_email', $emailAddress, $mobileNumber ); -
apply_filters( 'wp_sms_registration_username', $baseUsername, $mobileNumber ); -
apply_filters( 'wp_sms_report_email_content', '' ); -
apply_filters( 'wp_sms_report_email_data', Helper::loadTemplate('email/partials/report-data.php', [ 'sms_data' => $smsData, 'subscription_data' => $subscriptionData, 'login_data' => $loginData, 'duration' => $duration ]) ); -
apply_filters( 'wp_sms_request_days_format', $args['format'] ); -
apply_filters( 'wp_sms_rollback_subscriber_on_failed_welcome', true, $mobile, $welcomeError ); -
apply_filters( 'wp_sms_sanitize_mobile_number', sanitize_text_field(trim($mobile)) ); -
apply_filters( 'wp_sms_send_front_sms_ajax', null ); -
apply_filters( 'wp_sms_send_sms_block_visibility', __return_false() ); -
apply_filters( 'wp_sms_send_sms_response', esc_html__('Successfully send SMS!', 'wp-sms') ); -
do_action( 'wp_sms_settings_page' ); -
apply_filters( "wp_sms_settings_render_{$this->active_tab}", $args ); -
apply_filters( 'wp_sms_shorturl', $longUrl ); -
apply_filters( 'wp_sms_sms_otp_length', $length ); -
apply_filters( 'wp_sms_user_id', $userId ); -
apply_filters( 'wp_sms_user_profile_fields', [], $user->ID ); -
do_action( 'wp_sms_verify_subscriber', $name, $mobile, 1, $check_mobile->ID ); -
apply_filters( 'wp_sms_wc_mobile_numbers_query_args', $baseArgs ); -
apply_filters( 'wpcf7_special_mail_tags', null, $tag, '', new \WPCF7_MailTag($tag, 'text', $tag) ); -
apply_filters( 'wpsms_addon_dashboard_support', [] ); -
apply_filters( 'wpsms_admin_localized_fluent_forms_data', ['isActive' => false, 'forms' => []] ); -
apply_filters( 'wpsms_get_settings', $settings ); -
apply_filters( 'wpsms_mobile_field_sources', [] ); -
apply_filters( 'wpsms_unsubscribe_csrf_enabled', true ); -
apply_filters( 'wpsms_unsubscribe_query_string', 'wpsms_unsubscribe' ); -
apply_filters( 'wpsms_welcome_sms_message', $message, $mobile ); -
apply_filters( 'wpsms_woocommerce_order_opt_in_notification', false ); -
apply_filters( 'wpsms_woocommerce_order_view_mobile_numbers', $numbers, $order );
Generated from WSMS (formerly WP SMS): SMS Notifications, OTP Login and WooCommerce SMS's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: