How to customize Frontend Manager Invoice Template

Invoice template has 7 available hooks for the customization.

  • wpcfe_before_invoice_content – Where the styles of the template is added
  • wpcfe_start_invoice_section – This hook is for the additional information before the table data is display.
  • wpcfe_invoice_site_info – Where the site information is hooked
  • wpcfe_invoice_barcode_info – Where the Shipment Number and barcode is hooked
  • wpcfe_middle_invoice_section – This hook is for the additional information after the invoice header data is display.
  • wpcfe_invoice_shipper_info – Where the Shipper Information is hooked
  • wpcfe_invoice_receiver_info – Where the Receiver Information is hooked
  • wpcfe_end_invoice_section – Where the Package details is hooked
  • wpcfe_after_invoice_content – This hook is for the additional information after all the invoice data is display.

This is a sample code to customize the Site Information section, add this code to you active theme functions.php file

How to customize Site Information section?

/* Remove the existing Site Information data */
remove_action( 'wpcfe_invoice_site_info', 'wpcfe_invoice_site_info_callback', 10, 1 );
/* Custom Site Information */
function custom_site_info( $shipmentDetails ){
    // Note: $shipmentDetails return shipment ID and shipment Title which you can use for the shipment Information
    // Add your custom site infomation HERE
}
add_action( 'wpcfe_invoice_site_info', 'custom_site_info', 10, 1 );

How to customize Barcode Information section?

/* Remove the existing Barcode Information data */
remove_action( 'wpcfe_invoice_barcode_info', 'wpcfe_invoice_barcode_info_callback', 10 );
/* Custom Barcode Information */
function custom_badcode_info( $shipmentDetails ){
    // Note: $shipmentDetails return shipment ID and shipment Title which you can use for the shipment Information
    // Add your custom Barcode infomation HERE
}
add_action( 'wpcfe_invoice_barcode_info', 'custom_badcode_info', 10, 1 );

How to customize Shipper Information section?

/* Remove the existing Shipper Information data */
remove_action( 'wpcfe_invoice_shipper_info', 'wpcfe_invoice_shipper_info_callback', 10 );
/* Custom Shipper Information */
function custom_shipper_info( $shipmentDetails ){
    // Note: $shipmentDetails return shipment ID and shipment Title which you can use for the shipment Information
    // Add your custom Shipper infomation HERE
}
add_action( 'wpcfe_invoice_shipper_info', 'custom_shipper_info', 10, 1 );

How to customize Receiver Information section?

/* Remove the existing Receiver Information data */
remove_action( 'wpcfe_invoice_receiver_info', 'wpcfe_invoice_receiver_info_callback', 10, 1 );
/* Custom Receiver Information */
function custom_receiver_info( $shipmentDetails ){
    // Note: $shipmentDetails return shipment ID and shipment Title which you can use for the shipment Information
    // Add your custom Receiver infomation HERE
}
add_action( 'wpcfe_invoice_receiver_info', 'custom_receiver_info', 10, 1 );

How to customize before and after invoice content

/* Additional section before invoice */
function wpcfe_invoice_before_content_callback( $shipmentDetails ){
    // Note: $shipmentDetails return shipment ID and shipment Title which you can use for the shipment Information
}
add_action( 'wpcfe_after_invoice_content', 'wpcfe_invoice_before_content_callback', 10, 1 );
/* Additional section after invoice */
function wpcfe_invoice_after_content_callback( $shipmentDetails ){
    // Note: $shipmentDetails return shipment ID and shipment Title which you can use for the shipment Information
}
add_action( 'wpcfe_after_invoice_content', 'wpcfe_invoice_after_content_callback', 10, 1 );
0
    0
    Your Cart
    Your cart is emptyReturn to Shop