• Resolved fimo66

    (@fimo66)


    Hi,
    im a happy user of your plugin:

    Version 5.8.0

    but i wonder if its possible to set any settings in the admin area of my wordpress
    to being able to see if any new orders has come with the help of a icon, flag in the top admin area, so i dont have to go into admin>woocommerce>orders everytime
    to see if an order has come or is there another way for me to see this elsewhere by another way ?

Viewing 4 replies - 1 through 4 (of 4 total)
  • No setting for that so you’ll need a snippet:

    add_action('admin_bar_menu', 'show_new_orders_in_admin_bar', 900 );
    function show_new_orders_in_admin_bar( $wp_admin_bar ) {
      $order_count = wc_processing_order_count();
      $args = array(
          'id' => 'new_orders',
          'title' => 'Orders'.' <span class="order_count">'.$order_count.'</span>', 
          'href' => 'https://topcode.co.uk/dev/wp-admin/edit.php?post_type=shop_order', 
          'meta' => array(
              'class' => 'show_new_orders_in_admin_bar', 
              'title' => 'Show new orders'
              )
      );
      $wp_admin_bar->add_node($args);
    }

    Then some custom css to make it show in red:

    #wpadminbar .order_count {
      display: inline-block;
      min-width: 13px;
      height: 17px;
      padding: 0 4px 4px;
      text-align: center;
      line-height: 1.6;
      background-color: #d63638;
      border-radius: 10px;
    }

    This will need an admin-side css plugin.

    So this will show the number of processing orders, ie paid for and ready for you to fulfill. Unpaid orders will not be included.

    Thread Starter fimo66

    (@fimo66)

    Hi “lorro”

    Sorry for the late reply but THANK you for the solution which i will try to see if can
    implement on my site or perhaps its above my skill level, but i will give it a try.

    But thank you very much for your help / answer !

    Mirko P.

    (@rainfallnixfig)

    Hi @fimo66,

    The solution shared by lorro works perfectly (thank you!). This is how the notification for orders in the “Processing” status is displayed on my WooCommerce test site:


    Link to image: https://i.imgur.com/MGbaNjs.png

    As a side note, I would recommend using a plugin like Code Snippets to add custom PHP code into your site without directly accessing the functions.php file and Simple Custom CSS and JS to add CSS to the admin side.

    I’m going to close the thread now. You can start a new topic if you have any further questions.

    Cheers.

    Thread Starter fimo66

    (@fimo66)

    Thanks all of you, i got it to work – so im very very happy now

    Have a nice weeknd !

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘New orders flag / icon ?’ is closed to new replies.