How to customize invoice layout
Hooks in Traking Details
Copy following codes in your theme’s functions.php file.
/* * Before Tracking Details hook */ add_action('wpcargo_before_track_details', 'wpcargo_before_track_details_callback'); function wpcargo_before_track_details_callback($shipment){ ?> <h4>Before Tracking Details</h4> <?php } /* * After Tracking Details hook */ add_action('wpcargo_after_track_details', 'wpcargo_after_track_details_callback'); function wpcargo_after_track_details_callback($shipment){ ?> <h4>After Tracking Details</h4> <?php }
Hooks in After Header Information
/* * After Header Information hook */ add_action('wpcargo_track_after_header_details', 'wpcargo_track_after_header_details_callback'); function wpcargo_track_after_header_details_callback($shipment){ ?> <p>After Header Information</p> <?php }
Hooks in Shipment Information
/* * Before Shipment Information hook */ add_action('wpcargo_before_shipment_details', 'wpcargo_before_shipment_details_callback'); function wpcargo_before_shipment_details_callback($shipment){ ?> <p>Before Shipment Information</p> <?php }
Hooks in Package Total
/* * After Package Total hook */ add_action('wpcargo_after_package_totals', 'wpcargo_after_package_totals_callback'); function wpcargo_after_package_totals_callback( $shipment ){ ?> <p>After Package Total</p> <?php }