• Resolved tom

    (@klickchoice)


    Hi, Thank you for your awesome plugin .
    I need a help , is there any way to change order note color in admin panel .
    for example green color for “Order status changed from Processing to Confirmed.” yellow color for “Order status changed from Pending Payment to Processing.”

    Is there any hook available ? Please reply .

    https://www.ads-software.com/plugins/woocommerce/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter tom

    (@klickchoice)

    It is not about the status icon or status color . It is about the order notes .
    for example it is about the –> “Order status changed from Processing to Confirmed.
    added on December 29, 2015 at 11:22 AM
    Delete note” in single order detailed page(wp-admin/post.php?post=12345&action=edit).

    not about the status icon example green icon for confirmed order in order list page(wp-admin/edit.php?post_type=shop_order).

    Same situation for me. Is there any way to sort out.? Because my staff’s need to make order detail more user friendly . If we can make different colors then they can easily identify the order note without reading all content .

    Thread Starter tom

    (@klickchoice)

    Hi, anyone know the solution for this problem. Please help . I need to change the order note color in backend .Is there any solution?

    WooCommerce 2.5 is on its way. That introduces a filter for $note_classes which was missing in previous version. Once that ships, you can use following code which adds css classes to order note containers. Then you can use those classes to apply colors. You need to put this in your functions.php file.

    function woo_process_order_note_classes($note_classes, $note){
    
    	$per_note_status = explode('to ', $note->comment_content );
    
    	switch ($per_note_status[1]) {
    		case 'Pending Payment.':
    			$note_classes[] = 'pending-note';
    			return $note_classes;
    			break;
    
    		case 'Processing.':
    			$note_classes[] = 'processing-note';
    			return $note_classes;
    			break;
    
    		case 'On Hold.':
    			$note_classes[] = 'onhold-note';
    			return $note_classes;
    			break;
    
    		case 'Completed.':
    			$note_classes[] = 'completed-note';
    			return $note_classes;
    			break;
    
    		case 'Cancelled.':
    			$note_classes[] = 'cancelled-note';
    			return $note_classes;
    			break;
    
    		case 'Refunded.':
    			$note_classes[] = 'refunded-note';
    			return $note_classes;
    			break;
    
    		case 'Failed.':
    			$note_classes[] = 'failed-note';
    			return $note_classes;
    			break;
    
    		default:
    			return get_comment_meta( $note->comment_ID, 'is_customer_note', true ) ? array( 'customer-note', 'note' ) : array( 'note' );
    			break;
    	}
    
    }
    add_filter('woocommerce_order_note_class', 'woo_process_order_note_classes', 10, 2); 
    
    function load_woo_order_note_css() {
    	global $current_screen;
    
    	if ( "shop_order" == $current_screen->post_type ) {
    		wp_register_style( 'order-note-style', get_stylesheet_directory_uri() . '/admin/order-note.css' );
    		wp_enqueue_style( 'order-note-style' );
    	}
    }
    add_action( 'admin_enqueue_scripts', 'load_woo_order_note_css', 11 );

    Also don’t forget to create order-note.css file. Below is css which I used:

    .note.pending-note .note_content { background: #993300; color: #ffffff; }
    	.note.pending-note .note_content:after { border-color: #993300 transparent; }
    
    .note.processing-note .note_content { background: #00FF00; color: #000000; }
    	.note.processing-note .note_content:after { border-color: #00FF00 transparent; }
    
    .note.onhold-note .note_content { background: gray; color: #ffffff;}
    	.note.onhold-note .note_content:after { border-color: gray transparent; }
    
    .note.completed-note .note_content { background: #003300; color: #ffffff; }
    	.note.completed-note .note_content:after { border-color: #003300 transparent; }
    
    .note.cancelled-note .note_content { background: #280000 ; color: #ffffff; }
    	.note.cancelled-note .note_content:after { border-color: #280000 transparent; }
    
    .note.refunded-note .note_content { background: #0066FF; color: #ffffff; }
    	.note.refunded-note .note_content:after { border-color: #0066FF transparent; }
    
    .note.failed-note .note_content { background: #CC0000; color: #ffffff; }
    	.note.failed-note .note_content:after { border-color: #CC0000 transparent; }
    Thread Starter tom

    (@klickchoice)

    Hi thank you ?? . where i need to place order-note.css .Current version is 2.5 . An i think it is already implemented now .

    Place the order-note.css in <theme folder>/admin/order-note.css. Let me know how it goes ??

    Just wrote a simple plugin for this, so if you don’t want to go in code, simply install this plugin.

    Thread Starter tom

    (@klickchoice)

    Happy to see your plugin ?? . Best of luck friend . You did a good thing

    Hi,

    Is there any way to remove just that “Delete note”? I don’t want no one delete the notes and I want to see who processed the order.

    Thanks

    @rishk – This thread was originally created for something else. So please create a separate topic for your query.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Is there any way to change order note color in admin panel .’ is closed to new replies.