Skip to content

Instantly share code, notes, and snippets.

@propertyhive
propertyhive / trigger_portal_update.php
Created November 18, 2024 21:03 — forked from CallumPrimeDev/trigger_portal_update.php
A custom endpoint that updates the price field and opening bid (custom field) for a given property
<?php
add_action('rest_api_init', function () {
register_rest_route('ppa/v1', '/update-property/', array(
'methods' => 'POST',
'callback' => 'update_property',
'permission_callback' => 'basic_auth_permission_check'
));
});