manage_wpcargo_shipment_posts_custom_column
“manage_wpcargo_shipment_posts_custom_column” action hook is used to add data to custom column in the shipment table.
Copy and paste this sample code in the theme functions.php file
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | //add custom column in the shipment table (Shipment Id in this code) function custom_columns( $columns ) { $columns [ 'custom_column' ] = 'Shipment ID' ; return $columns ; } add_filter( 'manage_wpcargo_shipment_posts_columns' , 'custom_columns' ); //Add shipment ID data to the custom column function add_custom_shipment_column( $column ){ global $post , $wpcargo ; if ( $column == 'custom_column' ): echo $post ->ID; endif ; } add_action( 'manage_wpcargo_shipment_posts_custom_column' , 'add_custom_shipment_column' ); |