add_action('after_setup_theme','add_my_custom_meta_field');function add_my_custom_meta_field(){add_filter('wp_schema_pro_schema_meta_fields','my_extra_schema_field');add_filter('wp_schema_pro_schema_service','my_extra_schema_field_mapping',10,3)}function my_extra_schema_field($fields){$fields['bsf-aiosrs-service']['subkeys']['geo-latitude']=array(// `bsf-aiosrs-book` used for Book,`bsf-aiosrs-event` will for Event like that. 'label'=>esc_html__('Location latitude','aiosrs-pro'),// Label to display in Mapping fields 'type'=>'text',// text/date/image 'default'=>'none',);$fields['bsf-aiosrs-service']['subkeys']['geo-longitude']=array(// `bsf-aiosrs-book` used for Book,`bsf-aiosrs-event` will for Event like that. 'label'=>esc_html__('Location longitude','aiosrs-pro'),// Label to display in Mapping fields 'type'=>'text',// text/date/image 'default'=>'none',);$fields['bsf-aiosrs-service']['subkeys']['geo-radius']=array(// `bsf-aiosrs-book` used for Book,`bsf-aiosrs-event` will for Event like that. 'label'=>esc_html__('Geo Radius','aiosrs-pro'),// Label to display in Mapping fields 'type'=>'text',// text/date/image 'default'=>'none',);return $fields}function my_extra_schema_field_mapping($schema,$data,$post){if (isset($data['geo-latitude']) && isset($data['geo-longitude'])){$schema['areaServed']['@type']='GeoCircle';$schema['areaServed']['geoMidpoint']['latitude']=wp_strip_all_tags($data['geo-latitude']);$schema['areaServed']['geoMidpoint']['longitude']=wp_strip_all_tags($data['geo-longitude'])}if (isset($data['geo-radius']) && isset($data['geo-radius'])){$schema['areaServed']['@type']='GeoCircle';$schema['areaServed']['geoRadius']=wp_strip_all_tags($data['geo-radius'])}return $schema}