Plugin Directory

Changeset 1858014


Ignore:
Timestamp:
04/13/2018 05:53:38 PM (8 years ago)
Author:
deller21
Message:

fix bugs

Location:
wp-smsru/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wp-smsru/trunk/admin/classes/class-smsru-start-wc.php

    r1787519 r1858014  
    3434        $this->general_settings = get_option('smsru_settings');
    3535        $this->wc_settings = get_option('smsru_wc_event_settings');
    36 
     36       
    3737        if (isset($this->general_settings['api_id'])) {
    3838            $this->smsru = new SMSRU($this->general_settings['api_id']);
     
    9999            $data->text = $event['message'];
    100100        }
    101 
    102         $this->$type[$func] = (object)array_merge((array)$this->data, (array)$data);
     101       
     102        $result_data = (object)array_merge((array)$this->data, (array)$data);
     103       
     104        switch($type) {
     105            case 'current_admin_event';
     106                $this->current_admin_event[$func] = $result_data;
     107                break;
     108            case 'custom_wc_event_variable';
     109                $this->custom_wc_event_variable[$func] = $result_data;
     110                break;
     111            case 'custom_wc_status_event_variable';
     112                $this->custom_wc_status_event_variable[$func] = $result_data;
     113                break;
     114            case 'current_client_event';
     115                $this->current_client_event[$func] = $result_data;
     116                break;
     117        }
     118        //$this->current_admin_event[$func] = (object)array_merge((array)$this->data, (array)$data);
     119       
     120        //wp_mail('shelestov.a.s@gmail.com', 'проверка', print_r(array($event, $func, $type, (object)array_merge((array)$this->data, (array)$data), $this->current_admin_event), true));
    103121
    104122    }
     
    252270    // для админа если оформлен новый заказ
    253271    public function admin_woocommerce_checkout_update_order_meta($order_id, $data)
    254     {
     272    {       
    255273        $search = array('{NUM}', '{SUM}', '{EMAIL}', '{PHONE}', '{FIRSTNAME}', '{LASTNAME}', '{CITY}', '{ADDRESS}', '{BLOGNAME}');
    256274
     
    271289
    272290        $this->smsru->send($this->current_admin_event[__FUNCTION__]);
    273         //wp_mail('shelestov.a.s@gmail.com', 'новый заказ', print_r(array($order, $data, $this->current_admin_event[__FUNCTION__]), true));
     291       
     292        /*wp_mail('shelestov.a.s@gmail.com', 'новый заказ', print_r(array(
     293            $this->wc_settings['wc_event_admin'],
     294            $this->current_admin_event,
     295            $this->current_admin_event[__FUNCTION__],
     296            $this->data
     297        ), true));*/
    274298
    275299    }
  • wp-smsru/trunk/readme.txt

    r1787683 r1858014  
    44Requires at least: 3.0
    55Tested up to: 4.9.1
    6 Stable tag: 1.5
     6Stable tag: 1.6
    77License: GPLv2
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • wp-smsru/trunk/wp-smsru.php

    r1787519 r1858014  
    33 *Plugin Name: SMS.ru for Wordpress & WooCommerce
    44 *Description: SMS уведомлений с использованием шлюза SMS.RU
    5  *Version: 1.5
     5 *Version: 1.6
    66 *Author: Anton Shelestov
    77 *Author URI: http://verstaemvse.ru
     
    1414}
    1515
    16 define( 'SMSRU_VERSION', '1.5' );
     16define( 'SMSRU_VERSION', '1.6' );
    1717define( 'SMSRU_PREFIX_SLUG', 'smsru' );
    1818define( 'SMSRU_DIR_PATH', dirname( __FILE__ ) );
Note: See TracChangeset for help on using the changeset viewer.