{"id":30799,"date":"2021-09-29T13:27:37","date_gmt":"2021-09-29T11:27:37","guid":{"rendered":"https:\/\/www.sms77.io\/docs\/third-party-solutions\/wordpress\/"},"modified":"2021-12-10T11:00:37","modified_gmt":"2021-12-10T10:00:37","slug":"wordpress","status":"publish","type":"docs","link":"https:\/\/www.seven.io\/en\/docs\/third-party-solutions\/wordpress\/","title":{"rendered":"WordPress"},"content":{"rendered":"<p><a href=\"https:\/\/veronalabs.com\/\" target=\"_blank\" rel=\"noopener\">VeronaLabs<\/a> specializes on WordPress plugin development and has integrated sms77 into their popular plugin <a href=\"https:\/\/github.com\/veronalabs\/wp-sms\" target=\"_blank\" rel=\"noopener\">WordPress SMS<\/a>. 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.<\/p>\n<h2>Functionalities<\/h2>\n<ul>\n<li>SMS on new WordPress update<\/li>\n<li>SMS on user registration<\/li>\n<li>SMS on new comments<\/li>\n<li>SMS on user login<\/li>\n<li>Supports other plugins such as Contact form 7, WooCommerce and Easy Digital Downloads<\/li>\n<li>Supports WP Widget for newsletter subscribers<\/li>\n<li>Supports WP hooks<\/li>\n<li>Supports the REST API<\/li>\n<li>Subscribers import\/export<\/li>\n<li>&#8230; and much more!<\/li>\n<li>&#8230; and even more in the <a href=\"https:\/\/wp-sms-pro.com\/\" target=\"_blank\" rel=\"noopener\">pro version<\/a><\/li>\n<\/ul>\n<h2>Installation<\/h2>\n<ol>\n<li>Download the latest version as a *.zip from <a href=\"https:\/\/github.com\/veronalabs\/wp-sms\/releases\/latest\" target=\"_blank\" rel=\"noopener\">GitHub<\/a><\/li>\n<li>Unzip the archive to <code>\/wp-content\/plugins\/<\/code><\/li>\n<li>Enable the plugin via the &#8216;Plugins&#8217; menu item in WordPress<\/li>\n<\/ol>\n<h2>Usage Example<\/h2>\n<h3>Send SMS manually<\/h3>\n<pre lang='php'>\r\n$to = ['mobile number'];\r\n$text = \"The desired message content\";\r\n$asFlash = true; \/\/ Defines if the message should be sent as a flash SMS.\r\nwp_sms_send( $to, $text, $asFlash );\r\n<\/pre>\n<h3>Actions<\/h3>\n<p>Actions define what should happen additionally when another function is being called.<\/p>\n<h4>wp_sms_send<\/h4>\n<p><b>Example: <\/b>Send an additional email when sending SMS:<\/p>\n<pre lang='php'>\r\nfunction send_mail_on_sms_dispatch($message_info) {\r\n\twp_mail('recipient@ma.il', 'SMS dispatch', $message_info);\r\n}\r\nadd_action('wp_sms_send', 'send_mail_on_sms_dispatch');\r\n<\/pre>\n<h3>Filters<\/h3>\n<p>By using filters we can modify the submitted function parameters.<\/p>\n<h4>wp_sms_from<\/h4>\n<p><b>Example: <\/b>Prefix the German country code to the sender ID:<\/p>\n<pre lang='php'>\r\nfunction wp_sms_modify_sender($from) {\r\n\treturn '+49' . $from;\r\n}\r\nadd_filter('wp_sms_from', 'wp_sms_modify_sender');\r\n<\/pre>\n<h4>wp_sms_msg<\/h4>\n<p><b>Example: <\/b>Append a signature to outgoing message:<\/p>\n<pre lang='php'>\r\nfunction wp_sms_attach_signature($message) {\r\n\treturn $message . ' \/n Warm regards from sms77';\r\n}\r\nadd_filter('wp_sms_msg', 'wp_sms_attach_signature');\r\n<\/pre>\n","protected":false},"featured_media":0,"parent":17826,"menu_order":65,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-30799","docs","type-docs","status-publish","hentry"],"comment_count":0,"_links":{"self":[{"href":"https:\/\/www.seven.io\/en\/wp-json\/wp\/v2\/docs\/30799","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.seven.io\/en\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.seven.io\/en\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/www.seven.io\/en\/wp-json\/wp\/v2\/comments?post=30799"}],"version-history":[{"count":4,"href":"https:\/\/www.seven.io\/en\/wp-json\/wp\/v2\/docs\/30799\/revisions"}],"predecessor-version":[{"id":30979,"href":"https:\/\/www.seven.io\/en\/wp-json\/wp\/v2\/docs\/30799\/revisions\/30979"}],"up":[{"embeddable":true,"href":"https:\/\/www.seven.io\/en\/wp-json\/wp\/v2\/docs\/17826"}],"next":[{"title":"Workato","link":"https:\/\/www.seven.io\/en\/docs\/third-party-solutions\/workato\/","href":"https:\/\/www.seven.io\/en\/wp-json\/wp\/v2\/docs\/24509"}],"prev":[{"title":"WooCommerce","link":"https:\/\/www.seven.io\/en\/docs\/third-party-solutions\/woocommerce\/","href":"https:\/\/www.seven.io\/en\/wp-json\/wp\/v2\/docs\/19652"}],"wp:attachment":[{"href":"https:\/\/www.seven.io\/en\/wp-json\/wp\/v2\/media?parent=30799"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.seven.io\/en\/wp-json\/wp\/v2\/doc_tag?post=30799"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}