🔥 HOT: Changeset/ - Full Archive

Changeset 2045358


Ignore:
Timestamp:
03/06/2019 03:29:36 PM (7 years ago)
Author:
chandrapatel
Message:

Release 1.0.2 version

Location:
colored-order-notes-for-woocommerce/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • colored-order-notes-for-woocommerce/trunk/readme.md

    r1657910 r2045358  
    11# WooComerce Colored Order Notes #
    2 **Contributors:** prasad-nevase 
    3 **Tags:** woocommerce custom order note color, order note color, colored order note, coloured order notes, woocommerce coloured order notes 
    4 **Requires at least:** WordPress 4.4 or above 
    5 **Tested up to:** 4.7.4 
    6 **Stable tag:** 1.0.
    7 **License:** GPLv3 
    8 **License URI:** http://www.gnu.org/licenses/gpl-3.0.html 
     2**Contributors:** prasad-nevase
     3**Tags:** woocommerce custom order note color, order note color, colored order note, coloured order notes, woocommerce coloured order notes
     4**Requires at least:** WordPress 4.4 or above
     5**Tested up to:** 5.1
     6**Stable tag:** 1.0.2
     7**License:** GPLv3
     8**License URI:** http://www.gnu.org/licenses/gpl-3.0.html
    99
    1010This plugin allows you to customize order note color for each order status.
     
    5555## Changelog ##
    5656
     57### 1.0.2 - 2019-03-06 ###
     58* Compatible with WordPress 5.1 and WooCommerce 3.5.5
     59
    5760### 1.0.1 - 2017-05-03 ###
    5861* Updated the code to work with WordPress 4.7.4 and WooCommerce 3.0.5
  • colored-order-notes-for-woocommerce/trunk/readme.txt

    r1657910 r2045358  
    33Tags: woocommerce custom order note color, order note color, colored order note, coloured order notes, woocommerce coloured order notes
    44Requires at least: WordPress 4.4 or above
    5 Tested up to: 4.7.0
    6 Stable tag: 1.0.1
     5Tested up to: 5.1
     6Stable tag: 1.0.2
    77License: GPLv3
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    5353== Changelog ==
    5454
     55= 1.0.2 - 2019-03-06 =
     56* Compatible with WordPress 5.1 and WooCommerce 3.5.5
     57
    5558= 1.0.1 - 2017-05-03 =
    5659* Updated the code to work with WordPress 4.7.4 and WooCommerce 3.0.5
  • colored-order-notes-for-woocommerce/trunk/woocommerce-colored-order-notes.php

    r1657910 r2045358  
    1111 * Plugin URI:      https://wordpress.org/plugins/woocommerce-colored-order-notes/
    1212 * Description:     Assign custom colors to WooCommerce order notes from backend.
    13  * Version:         1.0.1
     13 * Version:         1.0.2
    1414 * Author:          Prasad Nevase
    1515 * Author URI:      https://about.me/prasad.nevase
     
    3232         *  Class Constructor
    3333         */
    34         function __construct() {
    35 
    36             add_action( 'init', array( $this, 'init' ) );
     34        public function __construct() {
     35
     36            add_action( 'init', array( $this, 'init' ) );
    3737
    3838        }
     
    7272         */
    7373        public static function wc_onc_add_settings_tab( $settings_tabs ) {
    74             $settings_tabs['order_note_color'] = __( 'Order Note Colors', 'colored-order-notes-for-woocommerce' );
     74            $settings_tabs['order_note_color'] = esc_html__( 'Order Note Colors', 'colored-order-notes-for-woocommerce' );
    7575            return $settings_tabs;
    7676        }
     
    104104        public static function wc_onc_get_settings() {
    105105
    106             $wc_onc_settings = array();
     106            $wc_onc_settings       = array();
    107107            $wc_onc_order_statuses = wc_get_order_statuses();
    108108
    109109            $wc_onc_settings[] = array(
    110                     'name'     => __( 'Order Note Colors', 'colored-order-notes-for-woocommerce' ),
    111                     'type'    => 'title',
    112                     'desc'     => 'Here you can specify the bacground color for order note based on order status',
    113                     'id'       => 'wc_settings_order_note_colors',
    114                 );
     110                'name' => esc_html__( 'Order Note Colors', 'colored-order-notes-for-woocommerce' ),
     111                'type' => 'title',
     112                'desc' => esc_html__( 'Here you can specify the bacground color for order note based on order status.', 'colored-order-notes-for-woocommerce' ),
     113                'id'   => 'wc_settings_order_note_colors',
     114            );
    115115
    116116            /* This loop will provide color setting option for all default + custom order status */
    117 
    118117            foreach ( $wc_onc_order_statuses as $wc_onc_order_status ) {
    119118
     
    130129            $wc_onc_settings[] = array(
    131130                'type' => 'sectionend',
    132                 'id' => 'wc_settings_order_note_colors_end',
     131                'id'   => 'wc_settings_order_note_colors_end',
    133132            );
    134133
     
    145144        public static function wc_onc_process_note_classes( $note_classes, $note ) {
    146145
    147             $per_note_status = explode( 'to ', $note->comment_content );
     146            if ( ! empty( $note->content ) ) { // For WC >= 3.2.0 version.
     147
     148                $per_note_status = explode( 'to ', $note->content );
     149
     150            } elseif ( ! empty( $note->comment_content ) ) { // For WC <= 2.7.0 version.
     151
     152                $per_note_status = explode( 'to ', $note->comment_content );
     153
     154            } else {
     155                return $note_classes;
     156            }
     157
    148158            $onc_css_classes = self::wc_onc_get_settings();
    149159
     
    197207        }
    198208    }
    199 } // End if().
     209}
    200210
    201211if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ), true ) ) {
     
    203213    global $wc_onc;
    204214
    205     $wc_onc = new WC_Settings_Order_Note_Colors;
     215    $wc_onc = new WC_Settings_Order_Note_Colors();
    206216
    207217}
Note: See TracChangeset for help on using the changeset viewer.