Changeset 2045358
- Timestamp:
- 03/06/2019 03:29:36 PM (7 years ago)
- Location:
- colored-order-notes-for-woocommerce/trunk
- Files:
-
- 3 edited
-
readme.md (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
woocommerce-colored-order-notes.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
colored-order-notes-for-woocommerce/trunk/readme.md
r1657910 r2045358 1 1 # 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.46 **Stable tag:** 1.0. 17 **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 9 9 10 10 This plugin allows you to customize order note color for each order status. … … 55 55 ## Changelog ## 56 56 57 ### 1.0.2 - 2019-03-06 ### 58 * Compatible with WordPress 5.1 and WooCommerce 3.5.5 59 57 60 ### 1.0.1 - 2017-05-03 ### 58 61 * 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 3 3 Tags: woocommerce custom order note color, order note color, colored order note, coloured order notes, woocommerce coloured order notes 4 4 Requires at least: WordPress 4.4 or above 5 Tested up to: 4.7.06 Stable tag: 1.0. 15 Tested up to: 5.1 6 Stable tag: 1.0.2 7 7 License: GPLv3 8 8 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 53 53 == Changelog == 54 54 55 = 1.0.2 - 2019-03-06 = 56 * Compatible with WordPress 5.1 and WooCommerce 3.5.5 57 55 58 = 1.0.1 - 2017-05-03 = 56 59 * 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 11 11 * Plugin URI: https://wordpress.org/plugins/woocommerce-colored-order-notes/ 12 12 * Description: Assign custom colors to WooCommerce order notes from backend. 13 * Version: 1.0. 113 * Version: 1.0.2 14 14 * Author: Prasad Nevase 15 15 * Author URI: https://about.me/prasad.nevase … … 32 32 * Class Constructor 33 33 */ 34 function __construct() {35 36 add_action( 'init', array( $this, 'init' ) );34 public function __construct() { 35 36 add_action( 'init', array( $this, 'init' ) ); 37 37 38 38 } … … 72 72 */ 73 73 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' ); 75 75 return $settings_tabs; 76 76 } … … 104 104 public static function wc_onc_get_settings() { 105 105 106 $wc_onc_settings = array();106 $wc_onc_settings = array(); 107 107 $wc_onc_order_statuses = wc_get_order_statuses(); 108 108 109 109 $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 ); 115 115 116 116 /* This loop will provide color setting option for all default + custom order status */ 117 118 117 foreach ( $wc_onc_order_statuses as $wc_onc_order_status ) { 119 118 … … 130 129 $wc_onc_settings[] = array( 131 130 'type' => 'sectionend', 132 'id' => 'wc_settings_order_note_colors_end',131 'id' => 'wc_settings_order_note_colors_end', 133 132 ); 134 133 … … 145 144 public static function wc_onc_process_note_classes( $note_classes, $note ) { 146 145 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 148 158 $onc_css_classes = self::wc_onc_get_settings(); 149 159 … … 197 207 } 198 208 } 199 } // End if().209 } 200 210 201 211 if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ), true ) ) { … … 203 213 global $wc_onc; 204 214 205 $wc_onc = new WC_Settings_Order_Note_Colors ;215 $wc_onc = new WC_Settings_Order_Note_Colors(); 206 216 207 217 }
Note: See TracChangeset
for help on using the changeset viewer.