Hooks and filters
Actions and filters you can use from a custom plugin or child theme. Each was checked against the plugin source.
Actions
after_slider
do_action( 'after_slider', $property_id );
Fires after the gallery on the Default property template only. 4Bids uses it to output the bidding panel. Callbacks must echo; a returned value is discarded.
add_action(
'after_slider',
function ( $property_id ) {
echo '<p class="my-notice">Viewing by appointment only.</p>';
}
);
after_property_content
do_action( 'after_property_content', $property_id );
Fires after the main property content on the Default and Gridzy templates. Callbacks must echo.
wppd_property_enquiry_recorded
do_action( 'wppd_property_enquiry_recorded', $property_id );
Fires after an enquiry from the property contact form is sent and counted.
wppd_imported_property
do_action( 'wppd_imported_property', $post_id, $property, $api_key, $is_new );
Fires after the Property Drive importer creates ($is_new = true) or updates (false) a property and saves its meta. $property is the feed record. It does not fire for locked properties, which are skipped, or for other importers.
Filters
wppd_contact_email_recipient
apply_filters( 'wppd_contact_email_recipient', $to, $property_id, $viewing );
Changes the recipient of property enquiry and viewing request emails. Return a valid email address; anything else is ignored. See Routing enquiry emails by property status.
wppd_contact_email_subject
apply_filters( 'wppd_contact_email_subject', $subject, $property_id, $viewing );
Changes the subject of property enquiry and viewing request emails. $viewing is empty for a normal enquiry.
add_filter(
'wppd_contact_email_subject',
function ( $subject, $property_id, $viewing ) {
$prefix = ( $viewing !== '' ) ? 'Viewing request' : 'Enquiry';
return $prefix . ' - ' . get_the_title( $property_id );
},
10,
3
);
wppd_alert_new_signup
apply_filters( 'wppd_alert_new_signup', $email );
Runs after a visitor signs up for property alerts. The return value is ignored, so treat it as an action that receives the subscriber’s email address.