<?php
function custom_woocommerce_shipment_tracking_default_provider( $provider ) {
$provider = 'Pos Laju'; // Replace this with the name of the provider.
return $provider;
}
add_filter( 'woocommerce_shipment_tracking_default_provider', 'custom_woocommerce_shipment_tracking_default_provider' );
/**
* wc_shipment_tracking_add_custom_provider
*
* Adds custom provider to shipment tracking
* Change the country name, the provider name, and the URL (it must include the %1$s)
* Add one provider per line
*/
function wc_shipment_tracking_add_custom_provider( $providers ) {
$providers['Malaysia']['Pos Laju'] = 'http://poslaju.com.my/track-trace-v2/';
return $providers;
}
add_action( 'wc_shipment_tracking_get_providers' , 'wc_shipment_tracking_add_custom_provider' );