Add the new assigned client section
Copy and paste this code:
function jdl_wpcfe_assign_client_callback( $shipment_id ) {
$wpcargo_client = wpcfe_get_users(‘wpcargo_client’);
if( can_wpcfe_assign_client() ): ?>
<div class=”form-group”>
<div class=”select-no-margin”>
<label><?php esc_html_e(‘Client’,’wpcargo-frontend-manager’); ?></label>
<select name=”registered_shipper” class=”mdb-select mt-0 form-control browser-default _custom_select” id=”registered_client” >
<option value=””><?php esc_html_e(‘– Select Client –‘,’wpcargo-frontend-manager’); ?></option>
<?php if( !empty( $wpcargo_client ) ): ?>
<?php foreach( $wpcargo_client as $key => $value ): ?>
<option value=”<?php echo $key; ?>” <?php selected( get_post_meta( $shipment_id, ‘registered_shipper’, TRUE ), $key ); ?>><?php echo $value; ?></option>
<?php endforeach; ?>
<?php endif; ?>
</select>
</div>
</div>
<?php endif;
}
add_action( ‘wpcfe_assign_form_content’, ‘jdl_wpcfe_assign_client_callback’, 10, 1 );
add_action( ‘wpcfe_bulk_assign_form_content’, ‘jdl_wpcfe_assign_client_callback’, 10, 1 );