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 where the original text in french is converted to the corresponding values expected by the Google JSON_LD specification:

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

Updated on September 25, 2023
Was this article helpful?

Related Articles

Need Support?
Can't find the answer you're looking for?
Contact Support