wpcargo_shipment_history_data

“wpcargo_shipment_history_data” action hook is used to add addition table column for the shipment history.

Note:This action hook needs also “wpcargo_shipment_history_header” for the table header label;

This is a sample hook code to add action column for the shipment history, copy and paste this code to the theme functions.php file


function my_custom_shipment_history_header( $shipment ){
    ?>
    <th>Action</th>
    <?php
}
add_action( 'wpcargo_shipment_history_header', 'my_custom_shipment_history_header' );
function my_custom_shipment_history_data( $shipment ){
    ?>
    <td><button class="btn-primary btn-sm" >Delete</button></td>
    <?php
}
add_action( 'wpcargo_shipment_history_data', 'my_custom_shipment_history_data' );

Screenshot:

5
    5
    Your Cart
    Remove
    Remove
    WPCargo Frontend Manager
    1 X $39.00 = $39.00
    Remove
    WPCargo SMS Add-ons
    1 X $39.00 = $39.00
    Remove
    WPCargo Merchant Package
    1 X $429.90 = $429.90
    Remove
    WPCargo Import and Export Add-ons
    1 X $39.00 = $39.00