Changeset 2370654
- Timestamp:
- 08/27/2020 09:38:07 PM (6 years ago)
- Location:
- powers-triggers-of-woo-to-chat/trunk
- Files:
-
- 6 edited
-
admin/class-wwp-admin.php (modified) (3 diffs)
-
admin/js/script.js (modified) (1 diff)
-
admin/views/wwp-settings-startview.php (modified) (6 diffs)
-
class-wwp-front.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
wc-whatsapp-powers.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
powers-triggers-of-woo-to-chat/trunk/admin/class-wwp-admin.php
r2355407 r2370654 47 47 48 48 function wpp_load_triggers(){ 49 $custom_status = apply_filters( 'wc_order_statuses', array() ); 50 foreach ($custom_status as $key => $status) { 51 $this->triggers['custom_status_'.$key] = array( 52 'ativo' => '', 53 'titulo' => 'Status customizado: '.$status, 54 'descricao' => '', 55 'action' => $key, 56 'modelo' => '', 57 ); 58 } 59 49 60 $settings = get_option( 'wwp_triggers', '' ); 50 61 if (!empty($settings)) { … … 65 76 } 66 77 } 78 67 79 } 68 80 81 69 82 function wwp_settings_add_menu (){ 70 add_menu_page( ' Woo & WhatsApp Powers', 'Woo & WhatsApp Powers', 'manage_options', 'woowhatspowers', array( $this, 'wwp_settings_startview' ), 'dashicons-testimonial');83 add_menu_page( 'Notificações WhatsApp', 'Notificações WhatsApp', 'manage_options', 'woowhatspowers', array( $this, 'wwp_settings_startview' ), 'dashicons-testimonial'); 71 84 } 72 85 … … 85 98 require_once plugin_dir_path(dirname(__FILE__)).'admin/views/wwp-settings-startview.php'; 86 99 } 100 87 101 88 102 function wwp_save_settings (){ -
powers-triggers-of-woo-to-chat/trunk/admin/js/script.js
r2346274 r2370654 43 43 var codedefault = $('#countryCode').attr('data-default'); 44 44 $('#countryCode').val(codedefault); 45 $( "#accordionTriggers" ).accordion(); 45 $( "#accordionTriggers" ).accordion({ 46 heightStyle: "content" 47 }); 46 48 $('#accordionTriggers input[type="checkbox"]').click(function(e) { 47 49 e.stopPropagation(); -
powers-triggers-of-woo-to-chat/trunk/admin/views/wwp-settings-startview.php
r2368149 r2370654 283 283 <?php endforeach ?> 284 284 </div> 285 285 286 <input type="submit" class="margin-top-bottom15 button button-primary" value="Salvar Gatilhos" /> 286 287 </div> 287 288 </form> 288 <h3>Legenda de Shortcode</h3> 289 </div> 290 <h2>Legenda de Shortcode</h2> 291 <div class="row postbox"> 289 292 <div class="legenda-block col s12"> 290 293 <div class="col s2"> 291 < strong>Básico</strong>294 <p><strong>Básico</strong></p> 292 295 <ul> 293 296 <li>{site_url}</li> … … 295 298 </div> 296 299 <div class="col s2"> 297 < strong>Nome</strong>300 <p><strong>Nome</strong></p> 298 301 <ul> 299 302 <li>{billing_first_name}</li> … … 302 305 </div> 303 306 <div class="col s2"> 304 < strong>Endereço de cobrança</strong>307 <p><strong>Endereço de cobrança</strong></p> 305 308 <ul> 306 309 <li>{billing_address_1}</li> … … 316 319 </div> 317 320 <div class="col s2"> 318 < strong>Nomes de entrega</strong>321 <p><strong>Nomes de entrega</strong></p> 319 322 <ul> 320 323 <li>{shipping_first_name}</li> … … 323 326 </div> 324 327 <div class="col s2"> 325 < strong>Endereço de entrega</strong>328 <p><strong>Endereço de entrega</strong></p> 326 329 <ul> 327 330 <li>{shipping_address_1}</li> … … 336 339 </div> 337 340 <div class="col s2"> 338 < strong>Pedido</strong>341 <p><strong>Pedido</strong></p> 339 342 <ul> 340 343 <li>{order_id}</li> -
powers-triggers-of-woo-to-chat/trunk/class-wwp-front.php
r2363422 r2370654 20 20 $settings = json_decode($settings); 21 21 $this->settings = $settings; 22 foreach ($settings as $ sValue) {22 foreach ($settings as $key => $sValue) { 23 23 if ($sValue->ativo == '1' and $sValue->action != 'reminder') { 24 add_action( $sValue->action, function ($orderId) use ($sValue) { 24 if ( strpos($key, 'custom_status_') === false) { 25 add_action( $sValue->action, function ($orderId) use ($sValue) { 25 26 $this->wwp_do_action($orderId,$sValue); 26 27 }, 10 ,1 ); 28 } else{ 29 add_action( 'woocommerce_order_status_changed', function ($orderId, $status_from, $status_to) use ($sValue) { 30 if (str_replace('wc-', '', $sValue->action) == $status_to ) { 31 $this->wwp_do_action($orderId,$sValue); 32 } 33 }, 10 ,3 ); 34 } 27 35 } 28 36 } -
powers-triggers-of-woo-to-chat/trunk/readme.txt
r2368149 r2370654 42 42 43 43 == Changelog == 44 * 1.2.0 45 * Nova função! Gatilhos para status personalizados; 46 * Melhoria no layout; 44 47 * 1.1.7 45 48 * Melhoria dos textos na interface; -
powers-triggers-of-woo-to-chat/trunk/wc-whatsapp-powers.php
r2368149 r2370654 4 4 * Plugin URI: https://wordpress.org/plugins/powers-triggers-of-woo-to-chat/ 5 5 * Description: Cria gatilhos para interação do Woocommerce com Whatsapp 6 * Version: 1. 1.76 * Version: 1.2.0 7 7 * Author: Felipe Peixoto 8 8 * Author URI: http://felipepeixoto.tecnologia.ws/
Note: See TracChangeset
for help on using the changeset viewer.