Skip to content

Instantly share code, notes, and snippets.

@barrykooij
Created August 22, 2018 12:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save barrykooij/7774e29dc9b43bc11e06586ec9881658 to your computer and use it in GitHub Desktop.
Save barrykooij/7774e29dc9b43bc11e06586ec9881658 to your computer and use it in GitHub Desktop.
function wpcm_custom_remove_fields( $fields ) {
unset( $fields['frdate'] );
unset( $fields['condition'] );
return $fields;
}
add_filter( 'wpcm_single_vehicle_data_fields', 'wpcm_custom_remove_fields', 10, 1 );
function wpcm_custom_remove_summary_fields( $fields ) {
foreach ( $fields as $k => $v ) {
if ( in_array( $v, array( 'frdate', 'condition' ) ) ) {
unset( $fields[ $k ] );
}
}
return $fields;
}
add_filter( 'wpcm_summary_data_fields', 'wpcm_custom_remove_summary_fields', 10, 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment