Descrição
Send Telegram messages notification:
* When receive a new order in Woocommerce.
* When a Woocommerce order change status.
* When receive new forms (supports CF7 and Ninjaform).
* When new user registers.
* When users login fail.
* When someone adds a product in the Woocommerce cart.
* When a new Pending posts is received. (works with any post type)
* Send custom message with Shortcode anywhere in your WP.
You can enable/disable every notification in the Plugin settings page.
- New field in Woocommerce checkout page let customers add his telegram nickname and when you
receive the order notification you can contact him on the fly ! - Shows Telegram Nick link in admin order details page when present
To configure the plugin, you need a valid Telegram API token. Its easy to get starting a Telegram Bot.
You can learn about obtaining tokens and generating new ones in
this document
or follow the info in this post
You also need at least one “chatid” number, that is the recipient to the message will be send. To know you personal chatid number, search on telegram app for “@get_id_bot” or
click here
Once You got the 2 fields save the configuration and try the “TEST” button .. you should receive a message in you telegram : “WOW IT WORKS” !! If not, check token and chatid fields again for the correct values.
this plugin is relying on a 3rd party service to geolocate the Ip address https://ip-api.com/
https://ip-api.com/docs/legal to see the services’ a terms of use and/or privacy policies
SHORTCODE EXAMPLE
[telegram_mess message="Im so happy" chatids="0000000," token="000000000:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" showsitename="1" showip="1" showcity="1" ]
SHORTCODE OPTIONS:
-
message : Your message to be sent. Example (message=”hello world”)
-
chatids : Recipient(s) who will receive your message separated by comma (example chatids=”0000000,11111111″) If empty , the shortcode will use default value in Plugin option page.
-
token: The token looks something like 123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11
if empty , the shortcode will use default value in Plugin option page. -
showsitename: if set to “1” appends sitename after the message. Defaultvalue is “0” Example (showsitename=”1″)
-
showip: if set to “1” appends user ip address after the message. Default value is “0” Example (showip=”1″)
-
showcity: if set to “1” appends user city name after the message. Default value is “0” Example (showcity=”1″)
USE SHORTCODE IN YOU PHP CODE
<?php
$date = date("d-m-Y");
do_shortcode('[telegram_mess message="'.$date .'" chatids="0000000," token="000000000:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" showsitename="1" showip="1" showcity="1" ]');
?>
Suggestions for other Notification, hooks and others plug integrations are Welcome !!
Imagens de tela
Instalação
This section describes how to install the plugin and get it working.
e.g.
- Upload the plugin files to the
/wp-content/plugins/plugin-name
directory, or install the plugin through the WordPress plugins screen directly. - Activate the plugin through the ‘Plugins’ screen in WordPress
- Use the Settings->Plugin Name screen to configure the plugin
- (Make your instructions match the desired user flow for activating and installing your plugin. Include any steps that might be needed for explanatory purposes)
FAQ
-
How to obtain Token?
-
When You create a telegram bot you will get a Token.
BotFather @botfather is the one bot to rule them all. It will help you create new bots and change settings for existing ones.search for @botfather
Creating a new bot
Use the /newbot command to create a new bot. The BotFather will ask you for a name and username, then generate an authorization token for your new bot.The name of your bot is displayed in contact details and elsewhere.
The Username is a short name, to be used in mentions and t.me links. Usernames are 5-32 characters long and are case insensitive, but may only include Latin characters, numbers, and underscores. Your bot’s username must end in ‘bot’, e.g. ‘tetris_bot’ or ‘TetrisBot’.
The token is a string along the lines of 110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw that is required to authorize the bot and send requests to the Bot API. Keep your token secure and store it safely, it can be used by anyone to control your bot.
Generating an authorization token.
If your existing token is compromised or you lost it for some reason, use the /token command to generate a new one. -
How to obtain the chat_id of a private Telegram channel?
-
The easiest way is to invite @get_id_bot in your chat and then type:
/my_id @get_id_bot
-
Can i insert more than one recipient chatid?
-
Yes you can add more than one chattid separated by a comma (,)
both in option page and in the shortcode.
Avaliações
Colaboradores e desenvolvedores
“Notification for Telegram” é um software com código aberto. As seguintes pessoas contribuíram para este plugin.
ColaboradoresTraduzir “Notification for Telegram” para o seu idioma.
Interessado no desenvolvimento?
Navegue pelo código, dê uma olhada no repositório SVN ou assine o registro de desenvolvimento via RSS.
Registro de alterações
1.7
custom message before telegram textbox in checkout page
Add dismiss button for notice
1.6
now you can enable a new field in Woocommerce checkout page let customers add his telegram nickname
1.4
Fix new order receaved and Order status change
No duplication now !!
1.3
Fix message text in shortcode was blank before
1.2
Add new option on woocommerce notification : only on new orders or on any order status change
1.1
add icons
1.0
Initial release