MC Woocommerce Order Tracking

By mookie4a4

★ 5.0/5 (1 ratings)10+ active installationsVersion 2.9

Adds order tracking code and courier fields to admin screen. Also displays the tracking information on order completed email and my account->orders …

Description

MC Woocommerce Order Tracking enables two new input fields on the order admin sidebar for use with tracking code and courier data. This is then shown on the my account view order page for customers to see. The order completed email will also contain the tracking and courier information.

You can update the tracking Code and Courier fields your self using the API. The two meta keys are:
‘_mc_tracking_code’
‘_mc_courier’

Couriers and their tracking links are managed under WooCommerce > Settings > Shipping > Order tracking, in a table with one row per courier:

  • Courier name: matched against the courier typed on an order. If more than one name matches, the longest wins, so “FedEx International Connect” can have its own link alongside “Fedex”.
  • Ships to: “All countries”, or a country whose row is used first for orders shipped there (e.g. Deutschepost uses USPS for US orders).
  • Tracking URL: put %s where the tracking code goes, or leave it empty to show the code without a link. A preview of the link is shown as you type.

The list comes prefilled with Royal Mail, DPD, UKmail, DHL, Fedex, UPS and Deutschepost, and “Restore default couriers” puts that list back. The courier field on the order screen suggests the names from the list as you type.

The links are used whenever the tracking code is displayed.

Installation

This section describes how to install the plugin and get it working.

e.g.

  1. Upload the plugin files to the /wp-content/plugins/mc-woocommerce-tracking directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress

Changelog

2.9

  • New: manage couriers and tracking links under WooCommerce > Settings > Shipping > Order tracking
  • Tracking section now always shown on the customer’s order page
  • Minor fixes and security improvements

2.8.4

  • Fix for allowing the API update of the meta fields

2.8.3

  • Security: nonce action name added and nonce now verified on save
  • Security: capability check added before saving tracking data
  • Security: added isset() guards on POST fields
  • Security: esc_attr() applied to metabox input values
  • Code: refactored duplicated courier URL map into shared helper method
  • Fix: DPD and DHL tracking URLs updated to HTTPS
  • Fix: UKMail now correctly handled in order completed email (no spurious tracking link)

2.8.2

  • tested wordpress 6.9

2.8.1

  • Updated UPS tracking url

2.8

  • Tested with Woocommerce 10.0 & updated code to check for woo

2.7

  • Tested with Woocommerce 9.9 & removed Russian post

2.6

  • Tested with Woocommerce 9.8 & WordPress 6.8

2.5

  • Tested with Woocommerce 9.6

2.4

  • Tested with WordPress 6.7

2.3

  • Tested with Woocommerce 9 & WordPress 6.6, Added UPS

2.2

  • Tested with Woocommerce 8.7 & WordPress 6.5, PHP8 Tested

2.1

  • Tested with Woocommerce 8.6 & WordPress 6.4

2.0

  • Updated with HPOS compatibility

1.6

  • Tested with Woocommerce 8.0 & WordPress 6.3

1.5

  • Tested with Woocommerce 7.8 & WordPress 6.2

1.4

  • Tested with Woocommerce 7.3 & WordPress 6.1

1.3

  • Tested with Woocommerce 6.8 & WordPress 6.0

1.2

  • Tested with Woocommerce 6.0

1.1

  • Updated method for email tracking links

1.0.20

  • Tested with WordPress 5.8

1.0.19

  • Tested with Woocommerce 5.3

1.0.18

  • Tested with Woocommerce 5.1 and WordPress 5.7

1.0.17

  • Tested with Woocommerce 5.0

1.0.16

  • Tested with Woocommerce 4.8 and WordPress 5.6

1.0.15

  • Tested with Woocommerce 4.6 and added Fedex tracking link

1.0.14

  • Tested with Woocommerce 4.5

1.0.13

  • Tested with Woocommerce 4.0

1.0.12

  • Tested with Woocommerce 3.9, Added Russian Post

1.0.11

  • Tested with WordPress 5.3

1.0.10

  • Compatibility with Woocommerce 3.8

1.0.9

  • Update Deutschepost tracking link to check for USA shipping and use USPS

1.0.8

  • Added “Deutschepost” tracking link

1.0.7

  • Tested for Woocommerce 3.7

1.0.6

  • Tested for WordPress 5.2

1.0.5

  • Changed save tracking priority (Fixed completed order email bug)
  • Tested for Woocommerce 3.6

1.0.4

  • Tested for WordPress 5.1

1.0.3

  • Added update button on order view page. Thanks to Rajikaru!

1.0.2

  • Tested for WordPress 5.0

1.0.1

  • Tested for Woocommerce 3.5.

1.0

  • It’s alive!
  • Display tracking info on order completed email.