PHPackages                             justdev/lomnio-api-connector - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. justdev/lomnio-api-connector

ActiveWordpress-plugin[API Development](/categories/api)

justdev/lomnio-api-connector
============================

Connects WordPress with the Lomnio API.

0.1.2(1mo ago)08GPL-2.0-or-laterPHPPHP &gt;=7.4

Since Jun 24Pushed 2w agoCompare

[ Source](https://github.com/justDev-studio/lomnio-api-connector)[ Packagist](https://packagist.org/packages/justdev/lomnio-api-connector)[ RSS](/packages/justdev-lomnio-api-connector/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (1)Versions (5)Used By (0)

Lomnio API Connector
====================

[](#lomnio-api-connector)

WordPress plugin for syncing Lomnio data into local database tables and reading it from theme code.

Installation
------------

[](#installation)

Recommended project install:

```
composer require justdev/lomnio-api-connector
```

When the plugin is installed from the project Composer file, Composer installs the plugin into `wp-content/plugins/lomnio-api-connector` through `composer/installers`. Plugin dependencies are installed by the root project.

Keep `woocommerce/action-scheduler` in root `vendor`, not in `wp-content/plugins/action-scheduler`. Add this exception before the generic `type:wordpress-plugin` installer path in the root project:

```
"installer-paths": {
	"vendor/woocommerce/action-scheduler/": [
		"woocommerce/action-scheduler"
	],
	"wp-content/plugins/{$name}/": [
		"type:wordpress-plugin"
	]
}
```

Local plugin development install:

```
cd wp-content/plugins/lomnio-api-connector
composer install
composer dump-autoload --no-dev
```

Activate the plugin in WordPress admin:

```
/wp-admin/plugins.php

```

Admin Pages
-----------

[](#admin-pages)

Endpoint management page:

```
/wp-admin/admin.php?page=lomnio-api-endpoints

```

This page allows admins to:

- enable or disable endpoints;
- set sync frequency;
- configure which `WP_ENV` values may send Leads;
- run all syncs manually;
- run Project, Units, or Floors sync separately;
- check Status, Message, and Fetched / Used At.

Hidden API token settings page:

```
/wp-admin/admin.php?page=lomnio-api-connector

```

The page is available only to users with `manage_options`. The API token is stored encrypted in `wp_options`.

You can paste either a raw token or the full header:

```
Authorization: Bearer YOUR_API_TOKEN

```

After saving a valid token, the plugin queues immediate Project, Units, and Floors sync when the endpoints are active.

Sync
----

[](#sync)

The plugin uses Action Scheduler.

Project action hook:

```
lomnio_api_connector_sync_project

```

Units action hook:

```
lomnio_api_connector_sync_units

```

Floors action hook:

```
lomnio_api_connector_sync_floors

```

Default schedules:

- Project: once per day;
- Units: every 10 minutes.
- Floors: every 10 minutes.

Available schedules include 5 minutes, 10 minutes, 30 minutes, hourly, twice daily, and daily.

Leads
-----

[](#leads)

Leads are sent through:

```
/v1/leads

```

The endpoint is managed on the endpoint management page. If Leads is inactive, calls to the sender return a skipped result and do not send, note, or log anything.

Allowed environments are controlled per endpoint. By default, only `production` sends real API requests. If the current `WP_ENV` is not allowed, the payload is recorded locally instead of being sent. The `All environments` option allows real sending from every environment.

Use the global class when you do not want to import a namespace:

```
$result = \LomnioLeads::send(
	array(
		'name'    => sanitize_text_field( $_POST['input_10'] ?? '' ),
		'email'   => sanitize_email( $_POST['input_3'] ?? '' ),
		'phone'   => sanitize_text_field( $_POST['input_4'] ?? '' ),
		'message' => sanitize_textarea_field( $_POST['input_5'] ?? '' ),
	),
	array(
		'source'   => 'Contact form',
		'entry_id' => isset( $entry['id'] ) ? (int) $entry['id'] : 0,
	)
);
```

When `GFAPI` exists and `entry_id` is passed, the plugin writes the request result to the Gravity Forms entry notes. For other forms, the plugin writes to:

```
wp-content/uploads/lomnio_leads_log.txt

```

The sender returns either a result array or `WP_Error`.

Stored Data
-----------

[](#stored-data)

Project data is stored in:

```
{$wpdb->prefix}lomnio_project

```

The table stores `ProjectResource` without the API `data` wrapper.

Units data is stored in:

```
{$wpdb->prefix}lomnio_units

```

Units sync uses one detailed list request:

```
/v1/units?per_page=-1&detailed=true

```

The plugin does not call:

```
/v1/units/{unit}

```

Each unit row stores the full `UnitDetailResource` in `payload_json`, plus separate columns for filtering and sorting: `project_id`, identifiers, status, type, layout, orientation, building, floor, phase, areas, pricing, floor plan, and bundle fields.

Legacy unit columns such as `list_payload_json`, `detail_payload_json`, `list_hash`, and `detail_hash` are not used. If `lomnio_units` was created by an older plugin version, recreate or migrate the table before running the current sync.

Floors data is stored in:

```
{$wpdb->prefix}lomnio_floors

```

Floors sync uses:

```
/v1/floors

```

Each floor row stores the full `FloorResource` in `payload_json`, plus separate columns for filtering and sorting: `project_id`, `id`, `name`, `number`, `sort_order`, `building`, `availability`, unit counts, `facade_map_id`, and `floor_plan_url`.

Local table relations:

```
lomnio_project.project_id = lomnio_units.project_id
lomnio_project.project_id = lomnio_floors.project_id
lomnio_floors.floor_id    = lomnio_units.floor_id

```

These are indexed local relation columns, not database-level foreign key constraints.

Theme Usage
-----------

[](#theme-usage)

Use global Lomnio classes in theme code. Do not instantiate repository classes directly unless you need low-level plugin internals.

Project as object:

```
$section['project'] = \LomnioProject::get();
```

Project as array:

```
$project = \LomnioProject::to_array();
```

Project ID:

```
$project_id = \LomnioProject::id();
```

Units list:

```
$section['units'] = \LomnioUnits::get();
```

Units with filters:

```
$section['units'] = \LomnioUnits::get(
	array(
		'status' => 'available',
		'floor'  => 2,
	)
);
```

Single unit by ID:

```
$section['unit'] = \LomnioUnits::find( 51 );
```

Single unit by code:

```
$section['unit'] = \LomnioUnits::find_by_code( 'A101' );
```

Units by floor:

```
$section['units'] = \LomnioUnits::by_floor( 10 );
```

Floors list:

```
$section['floors'] = \LomnioFloors::get();
```

Floors with filters:

```
$section['floors'] = \LomnioFloors::get(
	array(
		'building_id'  => 1,
		'availability' => 'available',
	)
);
```

Single floor by ID:

```
$section['floor'] = \LomnioFloors::find( 10 );
```

Single floor by number:

```
$section['floor'] = \LomnioFloors::find_by_number( 2 );
```

Floors by project:

```
$section['floors'] = \LomnioFloors::by_project( 51 );
```

Available Unit Filters
----------------------

[](#available-unit-filters)

`\LomnioUnits::get()` supports these filters:

- `id`
- `project_id`
- `unit_id`
- `code`
- `status`
- `status_code`
- `status_label`
- `status_color`
- `status_is_system`
- `type`
- `layout_type`
- `orientation`
- `floor`
- `floor_number`
- `floor_id`
- `floor_name`
- `building_id`
- `building_name`
- `phase_id`
- `phase_name`
- `room_count`
- `area`
- `area_floor`
- `area_gross`
- `area_building`
- `area_land`
- `price_without_vat`
- `price_with_vat`
- `discount_without_vat`
- `discount_with_vat`
- `discounted_price_without_vat`
- `discounted_price_with_vat`
- `price_per_sqm`
- `vat_rate`
- `pricing_hidden`
- `pricing_display_text`
- `floor_plan_url`
- `bundle_id`
- `bundle_name`

Filter values can be scalar values or arrays:

```
$units = \LomnioUnits::get(
	array(
		'status' => array( 'available', 'reserved' ),
		'floor'  => array( 1, 2, 3 ),
	)
);
```

Available Floor Filters
-----------------------

[](#available-floor-filters)

`\LomnioFloors::get()` supports these filters:

- `id`
- `project_id`
- `floor_id`
- `name`
- `number`
- `floor_number`
- `sort_order`
- `building_id`
- `building_name`
- `availability`
- `status`
- `units_count`
- `available_units_count`
- `facade_map_id`
- `floor_plan_url`

Filter values can be scalar values or arrays:

```
$floors = \LomnioFloors::get(
	array(
		'building_id'  => array( 1, 2 ),
		'availability' => array( 'available', 'unavailable' ),
	)
);
```

Direct Authorization Header
---------------------------

[](#direct-authorization-header)

If plugin code needs the configured authorization header:

```
$headers = \LomnioApiConnector\Plugin::instance()
	->secret_storage()
	->get_authorization_headers();
```

The result is either a headers array or `WP_Error`.

###  Health Score

34

—

LowBetter than 74% of packages

Maintenance94

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

44d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/75448126?v=4)[Kyrylo Dorozhynskyi](/maintainers/kirilldorozhynskyi)[@kirilldorozhynskyi](https://github.com/kirilldorozhynskyi)

---

Top Contributors

[![kirilldorozhynskyi](https://avatars.githubusercontent.com/u/75448126?v=4)](https://github.com/kirilldorozhynskyi "kirilldorozhynskyi (6 commits)")

### Embed Badge

![Health badge](/badges/justdev-lomnio-api-connector/health.svg)

```
[![Health](https://phpackages.com/badges/justdev-lomnio-api-connector/health.svg)](https://phpackages.com/packages/justdev-lomnio-api-connector)
```

###  Alternatives

[lucasdotvin/laravel-soulbscription

A straightforward interface to handle subscriptions and features consumption.

709209.3k](/packages/lucasdotvin-laravel-soulbscription)[wp-pay/core

Core components for the WordPress payment processing library.

26121.9k124](/packages/wp-pay-core)[wp-pay-extensions/gravityforms

Gravity Forms driver for the WordPress payment processing library.

1134.5k4](/packages/wp-pay-extensions-gravityforms)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
