Changeset 1715113
- Timestamp:
- 08/18/2017 08:09:50 AM (9 years ago)
- Location:
- woo-tracking-the-courier-guy
- Files:
-
- 3 added
- 2 edited
-
assets/admin-order-listing-action-buttons.jpg (added)
-
assets/tracking-code-meta-box.jpg (added)
-
assets/tracking-events-order-page.jpg (added)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/woo-tracking-the-courier-guy.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
woo-tracking-the-courier-guy/trunk/readme.txt
r1714476 r1715113 31 31 == Screenshots == 32 32 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 33 Enter 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 36 We 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 39 On 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 38 41 39 42 == Changelog == -
woo-tracking-the-courier-guy/trunk/woo-tracking-the-courier-guy.php
r1714476 r1715113 221 221 //} 222 222 //add_action( 'woocommerce_my_account_my_orders_actions', 'tcg_display_tracking_button', 50, 2 ); 223 // Tracking button in admin order list page 224 function 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 } 236 add_filter( 'woocommerce_admin_order_actions', 'add_track_order_actions_button', PHP_INT_MAX, 2 ); 237 //Add CSS 238 function add_tracking_order_actions_button_css() { 239 echo '<style>.view.tracking::after { content: "\f206" !important; }</style>'; 240 } 241 add_action( 'admin_head', 'add_tracking_order_actions_button_css' );
Note: See TracChangeset
for help on using the changeset viewer.