Plugin Directory

Changeset 1469399


Ignore:
Timestamp:
08/07/2016 08:32:26 AM (10 years ago)
Author:
deller21
Message:

update

Location:
wp-smsru/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wp-smsru/trunk/includes/functions.php

    r964370 r1469399  
    307307        $search = array('{NUM}', '{SUM}', '{EMAIL}', '{PHONE}', '{FIRSTNAME}', '{LASTNAME}', '{CITY}', '{ADDRESS}', '{BLOGNAME}', '{OLD_STATUS}', '{NEW_STATUS}');
    308308        $replace = array($order_id, strip_tags($order->get_formatted_order_total()), $order->billing_email, $order->billing_phone, $order->billing_first_name, $order->billing_last_name,
    309             $order->shipping_city, $order->shipping_address_1.' '.$order->shipping_address_2, get_option('blogname'), __($old_status, 'woocommerce'), __($new_status, 'woocommerce'));
     309            $order->shipping_city, $order->shipping_address_1.' '.$order->shipping_address_2, get_option('blogname'), wc_get_order_status_name($old_status), wc_get_order_status_name($new_status));
    310310
    311311        $partner_id = '18463';
     
    343343        $search = array('{NUM}', '{SUM}', '{EMAIL}', '{PHONE}', '{FIRSTNAME}', '{LASTNAME}', '{CITY}', '{ADDRESS}', '{BLOGNAME}', '{OLD_STATUS}', '{NEW_STATUS}');
    344344        $replace = array($order_id, strip_tags($order->get_formatted_order_total()), $order->billing_email, $order->billing_phone, $order->billing_first_name, $order->billing_last_name,
    345             $order->shipping_city, $order->shipping_address_1.' '.$order->shipping_address_2, get_option('blogname'), __($old_status, 'woocommerce'), __($new_status, 'woocommerce'));
     345            $order->shipping_city, $order->shipping_address_1.' '.$order->shipping_address_2, get_option('blogname'), wc_get_order_status_name($old_status), wc_get_order_status_name($new_status));
    346346
    347347        $partner_id = '18463';
     
    374374
    375375    function change_status_admin($order_id, $old_status, $new_status) {
     376       
    376377        $order = new WC_Order($order_id);
    377378        $search = array('{NUM}', '{SUM}', '{EMAIL}', '{PHONE}', '{FIRSTNAME}', '{LASTNAME}', '{CITY}', '{ADDRESS}', '{BLOGNAME}', '{OLD_STATUS}', '{NEW_STATUS}');
    378379        $replace = array('№'.$order_id, strip_tags($order->get_formatted_order_total()), $order->billing_email, $order->billing_phone, $order->billing_first_name, $order->billing_last_name,
    379                 $order->shipping_city, $order->shipping_address_1.' '.$order->shipping_address_2, get_option('blogname'), __($old_status, 'woocommerce'), __($new_status, 'woocommerce'));
     380                $order->shipping_city, $order->shipping_address_1.' '.$order->shipping_address_2, get_option('blogname'), wc_get_order_status_name($old_status), wc_get_order_status_name($new_status));
    380381
    381382        $partner_id = '18463';
     
    410411        $search = array('{NUM}', '{SUM}', '{EMAIL}', '{PHONE}', '{FIRSTNAME}', '{LASTNAME}', '{CITY}', '{ADDRESS}', '{BLOGNAME}', '{OLD_STATUS}', '{NEW_STATUS}');
    411412        $replace = array('№'.$order_id, strip_tags($order->get_formatted_order_total()), $order->billing_email, $order->billing_phone, $order->billing_first_name, $order->billing_last_name,
    412                 $order->shipping_city, $order->shipping_address_1.' '.$order->shipping_address_2, get_option('blogname'), __($old_status, 'woocommerce'), __($new_status, 'woocommerce'));
     413                $order->shipping_city, $order->shipping_address_1.' '.$order->shipping_address_2, get_option('blogname'), wc_get_order_status_name($old_status), wc_get_order_status_name($new_status));
    413414
    414415        $partner_id = '18463';
  • wp-smsru/trunk/readme.txt

    r1469392 r1469399  
    4040== Changelog ==
    4141
     42* статус в сообщение пишется как текст, а не системным кодом
     43
    4244* Initial release
Note: See TracChangeset for help on using the changeset viewer.