Created
May 18, 2026 11:17
-
-
Save propertyhive/5e3c3f0d2aae9d80fa9d91f747cd4824 to your computer and use it in GitHub Desktop.
Set EPC certificate ID in RTDF requests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_filter( 'ph_rtdf_send_request_data', 'set_rtdf_epc_certificate_id', 10, 2 ); | |
| function set_rtdf_epc_certificate_id( $request_data, $post_id ) | |
| { | |
| $epc_certificate_id = get_post_meta($post_id, '_epc_certificate_id', true); | |
| if ( !empty($epc_certificate_id) ) | |
| { | |
| $request_data['property']['details']['epc_information'] = array( | |
| 'epc_certificate_id' => trim($epc_certificate_id) | |
| ); | |
| } | |
| return $request_data; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment