Changeset 1719324
- Timestamp:
- 08/25/2017 12:30:15 PM (9 years ago)
- Location:
- woo-tracking-the-courier-guy/trunk
- Files:
-
- 3 added
- 2 edited
-
1.0.4 (added)
-
1.0.4/readme.txt (added)
-
1.0.4/woo-tracking-the-courier-guy.php (added)
-
readme.txt (modified) (1 diff)
-
woo-tracking-the-courier-guy.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woo-tracking-the-courier-guy/trunk/readme.txt
r1718204 r1719324 4 4 Requires at least: 3.0.1 5 5 Tested up to: 4.8.1 6 Stable tag: 1.0. 46 Stable tag: 1.0.5 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
woo-tracking-the-courier-guy/trunk/woo-tracking-the-courier-guy.php
r1718204 r1719324 2 2 3 3 /** 4 * Plugin Name: Woo Tracking for The Courier Guy5 * Description: This is a simple plugin to display tracking information for The Courier Guy on your WooCommerce orders page.6 * Author: Mustache7 * Author URI: http://www.mustache.co.za8 * Version: 1.0.4 9 */4 * Plugin Name: Woo Tracking for The Courier Guy 5 * Description: This is a simple plugin to display tracking information for The Courier Guy on your WooCommerce orders page. 6 * Author: Mustache 7 * Author URI: http://www.mustache.co.za 8 * Version: 1.0.5 9 */ 10 10 11 11 // Add meta box … … 154 154 ?> 155 155 <?php if (!empty($tracking_box)) : ?> 156 <div class="woo-tracking-the-courier-guy">157 <h3>Shipping Details</h3>158 <table class="table table-sm" width="100%">159 <thead>156 <div class="woo-tracking-the-courier-guy"> 157 <h3>Shipping Details</h3> 158 <table class="table table-sm" width="100%"> 159 <thead> 160 160 <tr> 161 161 <th align="left" width="30%">Waybill Number</th> … … 163 163 <th align="left" width="40%">Customer Name</th> 164 164 </tr> 165 </thead>166 <tbody>165 </thead> 166 <tbody> 167 167 <tr> 168 168 <td align="left"><?php echo $ex->result['waybill']->waybill; ?></td> … … 170 170 <td align="left"><?php echo $ex->result['waybill']->destpers; ?></td> 171 171 </tr> 172 </tbody>173 </table>174 <h3>Tracking Events</h3>175 <table class="table table-sm table-striped" width="100%">176 <thead>172 </tbody> 173 </table> 174 <h3>Tracking Events</h3> 175 <table class="table table-sm table-striped" width="100%"> 176 <thead> 177 177 <tr> 178 178 <th align="left" width="30%">Date</th> … … 180 180 <th align="left" width="40%">Details</th> 181 181 </tr> 182 </thead>183 <tbody>182 </thead> 183 <tbody> 184 184 <?php foreach ($ex->result['events'] as $event) { ?> 185 <tr>186 <td align="left"><?php echo $event->eventdate; ?></td>187 <td align="left"><?php echo $event->eventtime; ?></td>188 <td align="left"><?php echo $event->scanrule; ?></td>189 </tr>185 <tr> 186 <td align="left"><?php echo $event->eventdate; ?></td> 187 <td align="left"><?php echo $event->eventtime; ?></td> 188 <td align="left"><?php echo $event->scanrule; ?></td> 189 </tr> 190 190 <?php } ?> 191 </tbody>192 </table>193 </div>191 </tbody> 192 </table> 193 </div> 194 194 <?php endif; ?> 195 195 <?php } … … 222 222 //add_action( 'woocommerce_my_account_my_orders_actions', 'tcg_display_tracking_button', 50, 2 ); 223 223 // Tracking button in admin order list page 224 add_filter('woocommerce_admin_order_actions', 'add_track_order_actions_button', 100, 2); 224 225 function add_track_order_actions_button( $actions, $order ) 225 226 { 226 227 $tracking_box = get_post_meta( $order->get_id(), '_tracking_box', true ); 227 if ( !empty($tracking_box)) :228 if (empty($tracking_box) === false) { 228 229 $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"230 'url' => 'https://www.thecourierguy.co.za/tracking_results.php?WaybillNumber=' . $tracking_box, 231 'name' => __('Track', 'woocommerce'), 232 'action' => 'view tracking' 232 233 ); 234 } 233 235 return $actions; 234 endif; 235 } 236 add_filter( 'woocommerce_admin_order_actions', 'add_track_order_actions_button', PHP_INT_MAX, 2 ); 236 } 237 237 //Add CSS 238 238 function add_tracking_order_actions_button_css() {
Note: See TracChangeset
for help on using the changeset viewer.