Changeset 2979054
- Timestamp:
- 10/14/2023 05:09:22 PM (2 years ago)
- Location:
- telsender/trunk
- Files:
-
- 14 edited
-
clasess/TelegramSend.php (modified) (1 diff)
-
clasess/TelsenderCore.php (modified) (6 diffs)
-
clasess/TelsenderEvent.php (modified) (2 diffs)
-
clasess/TelsenderWc.php (modified) (1 diff)
-
clasess/TscfwcSetting.php (modified) (1 diff)
-
clasess/log.php (modified) (1 diff)
-
css/telsender.css (modified) (1 diff)
-
index.php (modified) (1 diff)
-
js/ajax.js (modified) (2 diffs)
-
readme.md (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
template/view.php (modified) (2 diffs)
-
template/woocommerce.php (modified) (1 diff)
-
template/wp-forms.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
telsender/trunk/clasess/TelegramSend.php
r2736141 r2979054 3 3 namespace pechenki\Telsender\clasess; 4 4 5 if ( ! defined( 'ABSPATH' ) ) { 6 exit; 7 } 5 8 /** 6 9 * curl sender -
telsender/trunk/clasess/TelsenderCore.php
r2952090 r2979054 7 7 use function Symfony\Component\Translation\t; 8 8 9 if ( ! defined( 'ABSPATH' ) ) { 10 exit; 11 } 9 12 /** 10 13 * Class TelsenderCore … … 80 83 public function tscfwc_dynamic_button() 81 84 { 82 add_menu_page('TelSender', 'TelSender ', 'manage_options', 'telsender', array($this, 'tscfwc_setting_page'), plugin_dir_url(__FILE__) . '../assets/icon-plugin.png');85 add_menu_page('TelSender', 'TelSender 🇺🇦', 'manage_options', 'telsender', array($this, 'tscfwc_setting_page'), plugin_dir_url(__FILE__) . '../assets/icon-plugin.png'); 83 86 add_submenu_page('telsender', 'Help', 'Help 🆘', 'manage_options', 'telsender-help', array($this, 'help'),10); 84 87 } … … 109 112 110 113 } 114 115 116 117 if ($this->tscfwc_setting_setcheck && isset($this->tscfwc_setting_setcheck['wooc_chat_id'])) { 118 $data['wooc_chat_id'] = $this->tscfwc_setting_setcheck['wooc_chat_id']; 119 } else { 120 $data['wooc_chat_id'] = ''; 121 122 } 123 111 124 112 125 if ($this->tscfwc_setting_setcheck && isset($this->tscfwc_setting_setcheck['wooc_all_order'])) { … … 232 245 233 246 if (in_array('wc-' . $order->get_status(), $wc_access_status) || !$wc_access_status) { 234 235 247 $isSendn = get_post_meta($order->get_id(), 'telsIsm', true); 236 237 248 if (!$wc_chek['wooc_check']) return; 249 if (!empty($wc_chek['wooc_chat_id'])) { 250 $this->telegram->Chat_id = $wc_chek['wooc_chat_id']; 251 } 238 252 239 253 if ($isSendn && $isSendn != '-1') { … … 294 308 'tscfwc_setting_setcheck' => array( 295 309 'wooc_check' => (int)htmlentities($this->post('tscfwc_setting_setcheck')['wooc_check']), 310 'wooc_chat_id' => htmlentities($this->post('tscfwc_setting_setcheck')['wooc_chat_id']), 296 311 'wooc_all_order' => (int)htmlentities($this->post('tscfwc_setting_setcheck')['wooc_all_order']), 297 312 'tscfwc_key' => (int)htmlentities($this->post('tscfwc_setting_setcheck')['tscfwc_key']) … … 333 348 } 334 349 350 351 335 352 if ($validatePost) { 336 353 update_option(TSCFWC_SETTING, serialize($validatePost)); 337 354 } 355 356 338 357 339 358 } -
telsender/trunk/clasess/TelsenderEvent.php
r2952090 r2979054 6 6 7 7 use pechenki\Telsender\clasess\TelsenderCore; 8 8 if ( ! defined( 'ABSPATH' ) ) { 9 exit; 10 } 9 11 /** 10 12 * @property mixed|null login_success … … 28 30 * @property array utm_list_val 29 31 */ 32 30 33 class TelsenderEvent 31 34 { -
telsender/trunk/clasess/TelsenderWc.php
r2736141 r2979054 3 3 namespace pechenki\Telsender\clasess; 4 4 5 if ( ! defined( 'ABSPATH' ) ) { 6 exit; 7 } 5 8 /** 6 9 * Class TelsenderWc -
telsender/trunk/clasess/TscfwcSetting.php
r2867750 r2979054 2 2 3 3 namespace pechenki\Telsender\clasess; 4 5 if ( ! defined( 'ABSPATH' ) ) { 6 exit; 7 } 4 8 /** 5 9 * Class TscfwcSetting -
telsender/trunk/clasess/log.php
r2736141 r2979054 1 <?php 1 <?php 2 2 3 namespace pechenki\Telsender\clasess; 3 4 5 if ( ! defined( 'ABSPATH' ) ) { 6 exit; 7 } 4 8 class log{ 5 9 -
telsender/trunk/css/telsender.css
r2952090 r2979054 113 113 border-radius: 10px 10px 0 0; 114 114 font-weight: 500; 115 display: flex; 116 flex-direction: column; 115 117 } 116 118 -
telsender/trunk/index.php
r2952090 r2979054 8 8 Description: Плагін відправляє заявки з форм у телеграм канал 9 9 Author: Pechenki 10 Version: 1.14. 711 Author URI: https://coder.org.ua/ telsender.html10 Version: 1.14.8 11 Author URI: https://coder.org.ua/dev/wordpress/telsender 12 12 */ 13 13 ////////////////////////////////// -
telsender/trunk/js/ajax.js
r2867750 r2979054 84 84 85 85 let tokenstr = document.querySelector('#getUpdates') 86 const token = document.querySelector('[name="tscfwc_setting_token"]') .value86 const token = document.querySelector('[name="tscfwc_setting_token"]')?.value; 87 87 88 88 let newurl = tokenstr.outerHTML.replaceAll('{token}',token) … … 91 91 92 92 function telsenderInfo(){ 93 const token = document.querySelector('[name="tscfwc_setting_token"]') .value93 const token = document.querySelector('[name="tscfwc_setting_token"]')?.value; 94 94 const url = `https://api.telegram.org/bot${token}/getUpdates` 95 95 telsenderTestSend() -
telsender/trunk/readme.md
r2952090 r2979054 46 46 47 47 == Changelog == 48 = 1.14.8 = 49 - add chat id from wooccommerce 50 - fix error 51 48 52 = 1.14.7 = 49 53 - add FAQ page -
telsender/trunk/readme.txt
r2952090 r2979054 5 5 Requires PHP: 5.6 6 6 Tested up to: 6.3 7 Stable tag: 1.14. 77 Stable tag: 1.14.8 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 74 74 75 75 == Changelog == 76 = 1.14.8 = 77 - add chat id from wooccommerce 78 - fix error 79 76 80 = 1.14.7 = 77 81 - add FAQ page -
telsender/trunk/template/view.php
r2952090 r2979054 35 35 </p> 36 36 37 < label>37 <div> 38 38 <input value="0" type="hidden" name="tscfwc_enabled" type="checkbox"/> 39 39 <input value="1" <?php echo checked($this->tscfwc_enabled); ?> name="tscfwc_enabled" 40 40 type="checkbox"/> 41 <span>Enabled</span></label> 41 <span>Enabled</span> 42 </div> 42 43 <div> 43 44 <label> 45 <span><?php _e("Token", "telsender"); ?></span> 44 46 <input type="text" value="<?php echo esc_attr($this->tscfwc_setting_token); ?>" 45 47 name="tscfwc_setting_token" placeholder=""/> 46 <span><?php _e("Token", "telsender"); ?></span> 48 47 49 </label> 48 50 </div> 49 51 <div> 50 <label><input type="text" value="<?php echo esc_attr($this->tscfwc_setting_chatid); ?>" 52 <label> 53 <span> <?php _e('ChatID', 'telsender'); ?></span> 54 <input type="text" value="<?php echo esc_attr($this->tscfwc_setting_chatid); ?>" 51 55 name="tscfwc_setting_chatid" 52 placeholder=""/>< span> <?php _e('ChatID', 'telsender'); ?></span></label>56 placeholder=""/></label> 53 57 </div> 54 58 </fieldset> … … 78 82 'is_check_wc' => $is_check_wc, 79 83 'list_statuse_wc' => $list_statuse_wc, 84 'wooc_chat_id' => $wooc_chat_id, 80 85 ]); ?> 81 86 -
telsender/trunk/template/woocommerce.php
r2867750 r2979054 2 2 <legend><?php _e("Send out woocommerce", "telsender"); ?></legend> 3 3 4 5 <p> 4 6 <input type="checkbox" name="tscfwc_setting_setcheck[wooc_check]" 5 7 value="1" <?php checked($is_check_wc); ?> /> 6 8 <?php _e("Send out woocommerce", "telsender"); ?></br></p> 9 <p> 10 <label> 11 <span><?php _e("ChatID", "telsender"); ?></span> 12 <input type="text" value="<?php echo esc_attr($wooc_chat_id); ?>" 13 name="tscfwc_setting_setcheck[wooc_chat_id]" placeholder=""/> 14 </label> 15 </p> 7 16 8 17 <?php /* @var string $list_statuse_wc - list statuses */ -
telsender/trunk/template/wp-forms.php
r2952090 r2979054 1 1 2 <fieldset> 2 3 <legend> <?php _e("Wp Form", "telsender"); ?> </legend>
Note: See TracChangeset
for help on using the changeset viewer.