custom salary units

If you have custom salary units we need help to map them to the Google JSON+LD salary units

Here is an example of french text

add_filter( 'matador_job_structured_data_salary_unit', function ( $unit, $salaryUnit ){

switch ( strtolower( $salaryUnit ) ) {
case 'par heure':
return 'HOUR';
break;
case 'par jour':
return 'DAY';
break;
case 'par semaine':
return 'WEEK';
break;
case 'par mois':
return 'MONTH';
break;
case 'par an':
return 'YEAR';
break;

default:
return $unit;
}

}, 10, 2 );

Note: We do handle a number of strings variants via our import/translations so you may not to have this code use the testing tool to see if we are handling it correctly