Plugin Directory

Changeset 1715113


Ignore:
Timestamp:
08/18/2017 08:09:50 AM (9 years ago)
Author:
francdore
Message:

Added screenshots to readme.txt
Added track button to listing page.

Location:
woo-tracking-the-courier-guy
Files:
3 added
2 edited

Legend:

Unmodified
Added
Removed
  • woo-tracking-the-courier-guy/trunk/readme.txt

    r1714476 r1715113  
    3131== Screenshots ==
    3232
    33 1. This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from
    34 the /assets directory or the directory that contains the stable readme.txt (tags or trunk). Screenshots in the /assets
    35 directory take precedence. For example, `/assets/screenshot-1.png` would win over `/tags/4.3/screenshot-1.png`
    36 (or jpg, jpeg, gif).
    37 2. This is the second screen shot
     33Enter tracking number on relevant order and save it. There is also a link which will open The Courier Guy website tracking page using the waybill number.
     34/assets/tracking-code-meta-box.jpg
     35
     36We have also added a tracking button on the orders listing page if a tracking number has been saved for an order. It will open The Courier Guy's tracking page with that waybill number.
     37/assets/admin-order-listing-action-buttons.jpg
     38
     39On the order page, customers will be able to see tracking for the order that they are viewing. It's displayed in a table and there is a div around it with a class that developers can use the style it.
     40/assets/tracking-events-order-page.jpg
    3841
    3942== Changelog ==
  • woo-tracking-the-courier-guy/trunk/woo-tracking-the-courier-guy.php

    r1714476 r1715113  
    221221//}
    222222//add_action( 'woocommerce_my_account_my_orders_actions', 'tcg_display_tracking_button', 50, 2 );
     223// Tracking button in admin order list page
     224function add_track_order_actions_button( $actions, $order )
     225{
     226    $tracking_box = get_post_meta( $order->get_id(), '_tracking_box', true );
     227    if (!empty($tracking_box)) :
     228        $actions['track_button'] = array(
     229            'url'   => 'https://www.thecourierguy.co.za/tracking_results.php?WaybillNumber=' . $tracking_box,
     230            'name'  => __( 'Track', 'woocommerce' ),
     231            'action' => "view tracking"
     232        );
     233    return $actions;
     234    endif;
     235}
     236add_filter( 'woocommerce_admin_order_actions', 'add_track_order_actions_button', PHP_INT_MAX, 2 );
     237//Add CSS
     238function add_tracking_order_actions_button_css() {
     239    echo '<style>.view.tracking::after { content: "\f206" !important; }</style>';
     240}
     241add_action( 'admin_head', 'add_tracking_order_actions_button_css' );
Note: See TracChangeset for help on using the changeset viewer.