Plugin Directory

Changeset 2370654


Ignore:
Timestamp:
08/27/2020 09:38:07 PM (6 years ago)
Author:
felipe152
Message:
  • 1.2.0
Location:
powers-triggers-of-woo-to-chat/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • powers-triggers-of-woo-to-chat/trunk/admin/class-wwp-admin.php

    r2355407 r2370654  
    4747
    4848    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
    4960        $settings = get_option( 'wwp_triggers', '' );
    5061        if (!empty($settings)) {
     
    6576            }   
    6677        }
     78       
    6779    }
    6880
     81
    6982    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');       
    7184    }
    7285
     
    8598        require_once plugin_dir_path(dirname(__FILE__)).'admin/views/wwp-settings-startview.php';
    8699    }
     100
    87101
    88102    function wwp_save_settings (){
  • powers-triggers-of-woo-to-chat/trunk/admin/js/script.js

    r2346274 r2370654  
    4343    var codedefault = $('#countryCode').attr('data-default');
    4444    $('#countryCode').val(codedefault);
    45     $( "#accordionTriggers" ).accordion();
     45    $( "#accordionTriggers" ).accordion({
     46      heightStyle: "content"
     47    });
    4648    $('#accordionTriggers input[type="checkbox"]').click(function(e) {
    4749        e.stopPropagation();
  • powers-triggers-of-woo-to-chat/trunk/admin/views/wwp-settings-startview.php

    r2368149 r2370654  
    283283                    <?php endforeach ?>
    284284                </div>
     285
    285286                <input type="submit" class="margin-top-bottom15 button button-primary" value="Salvar Gatilhos" />
    286287            </div>
    287288        </form>
    288         <h3>Legenda de Shortcode</h3>
     289    </div>
     290    <h2>Legenda de Shortcode</h2>
     291    <div class="row postbox">
    289292        <div class="legenda-block col s12">
    290293            <div class="col s2">
    291                 <strong>Básico</strong>
     294                <p><strong>Básico</strong></p>
    292295                <ul>
    293296                    <li>{site_url}</li>
     
    295298            </div>
    296299            <div class="col s2">
    297                 <strong>Nome</strong>
     300                <p><strong>Nome</strong></p>
    298301                <ul>
    299302                    <li>{billing_first_name}</li>
     
    302305            </div>
    303306            <div class="col s2">
    304                 <strong>Endereço de cobrança</strong>
     307                <p><strong>Endereço de cobrança</strong></p>
    305308                <ul>
    306309                    <li>{billing_address_1}</li>
     
    316319            </div>
    317320            <div class="col s2">
    318                 <strong>Nomes de entrega</strong>
     321                <p><strong>Nomes de entrega</strong></p>
    319322                <ul>
    320323                    <li>{shipping_first_name}</li>
     
    323326            </div>
    324327            <div class="col s2">
    325                 <strong>Endereço de entrega</strong>
     328                <p><strong>Endereço de entrega</strong></p>
    326329                <ul>
    327330                    <li>{shipping_address_1}</li>
     
    336339            </div>
    337340            <div class="col s2">
    338                 <strong>Pedido</strong>
     341                <p><strong>Pedido</strong></p>
    339342                <ul>
    340343                    <li>{order_id}</li>
  • powers-triggers-of-woo-to-chat/trunk/class-wwp-front.php

    r2363422 r2370654  
    2020            $settings = json_decode($settings);
    2121            $this->settings = $settings;
    22             foreach ($settings as $sValue) {
     22            foreach ($settings as $key => $sValue) {
    2323                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) {
    2526                            $this->wwp_do_action($orderId,$sValue);
    2627                        }, 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                    }
    2735                }
    2836            }
  • powers-triggers-of-woo-to-chat/trunk/readme.txt

    r2368149 r2370654  
    4242
    4343== Changelog ==
     44* 1.2.0
     45* Nova função! Gatilhos para status personalizados;
     46* Melhoria no layout;
    4447* 1.1.7
    4548* Melhoria dos textos na interface;
  • powers-triggers-of-woo-to-chat/trunk/wc-whatsapp-powers.php

    r2368149 r2370654  
    44 * Plugin URI:  https://wordpress.org/plugins/powers-triggers-of-woo-to-chat/
    55 * Description: Cria gatilhos para interação do Woocommerce com Whatsapp
    6  * Version:     1.1.7
     6 * Version:     1.2.0
    77 * Author:      Felipe Peixoto
    88 * Author URI:  http://felipepeixoto.tecnologia.ws/
Note: See TracChangeset for help on using the changeset viewer.