How to make remarks , date, time , location , status optional.
Note: Copy and paste it in functions.php of your current theme.
add_filter( 'wpcargo_history_fields', 'wpcargo_history_fields_callback' );
function wpcargo_history_fields_callback( $history_fields ){
/*
Make the fields unrequired
*/
$history_fields['date']['required'] = false;
$history_fields['time']['required'] = false;
$history_fields['location']['required'] = false;
$history_fields['status']['required'] = false;
$history_fields['updated-name']['required'] = false;
$history_fields['remarks']['required'] = false;
/*
Renaming the fields
*/
$history_fields['date']['label'] = 'Date New Label';
$history_fields['time']['label'] = 'Time New Label';
$history_fields['location']['label'] = 'Location New Label';
$history_fields['status']['label'] = 'Status New Label';
$history_fields['updated-name']['label'] = 'Update Name New Label';
$history_fields['remarks']['label'] = 'Remarks New Label';
How to make remarks , date, time , location , status removed.
/*
Removing of fields
*/
// Remove Date
unset( $history_fields['date'] );
// Remove Time
unset( $history_fields['time'] );
// Remove Location
unset( $history_fields['location'] );
// Remove Status
unset( $history_fields['status'] );
// Remove Update Name
unset( $history_fields['updated-name'] );
// Remove Remarks
unset( $history_fields['remarks'] );
return $history_fields;
}