PHPackages                             wp-twinfield/twinfield - 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. wp-twinfield/twinfield

AbandonedArchivedLibrary[API Development](/categories/api)

wp-twinfield/twinfield
======================

Twinfield library for WordPress.

3645[1 issues](https://github.com/wp-twinfield/twinfield/issues)[4 PRs](https://github.com/wp-twinfield/twinfield/pulls)PHP

Since Jul 8Pushed 1y ago1 watchersCompare

[ Source](https://github.com/wp-twinfield/twinfield)[ Packagist](https://packagist.org/packages/wp-twinfield/twinfield)[ RSS](/packages/wp-twinfield-twinfield/feed)WikiDiscussions develop Synced 3w ago

READMEChangelogDependenciesVersions (6)Used By (0)

Twinfield library for WordPress
===============================

[](#twinfield-library-for-wordpress)

Important

This library/repository is deprecated since November 6, 2024, for a more up-to-date library/repository please see .

[![Build Status](https://camo.githubusercontent.com/b8bb58a5fb8b3949f9595db05ee08223146d464af0a87e305d564a32ef90f29d/68747470733a2f2f7472617669732d63692e6f72672f77702d7477696e6669656c642f7477696e6669656c642e737667)](https://travis-ci.org/wp-twinfield/twinfield)[![Coverage Status](https://camo.githubusercontent.com/0622ea48d7d1289b130da0da84952af8f4037f03e5fb1a3bedf9e9c3a49bab86/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f77702d7477696e6669656c642f7477696e6669656c642f62616467652e7376673f6272616e63683d646576656c6f7026736572766963653d676974687562)](https://coveralls.io/github/wp-twinfield/twinfield?branch=develop)

Documentation
-------------

[](#documentation)

- [Twinfield API](https://www.twinfield.nl/api)

Examples
--------

[](#examples)

See the [`examples/`](examples) directory for examples of the key client features. You can view them in your browser by running the php built-in web server.

```
$ php -S localhost:8000 -t examples/

```

And then browsing to the host and port you specified (in the above example, `http://localhost:8000`).

Environment variables
---------------------

[](#environment-variables)

```
export TWINFIELD_USER=
export TWINFIELD_PASSWORD=
export TWINFIELD_ORGANISATION=
export TWINFIELD_OFFICE_CODE=
export TWINFIELD_ARTICLE_CODE=
export TWINFIELD_SUBARTICLE_CODE=
export TWINFIELD_CUSTOMER_CODE=
export TWINFIELD_SALES_INVOICE_TYPE=
export TWINFIELD_SALES_INVOICE_NUMBER=

```

Travis CI
---------

[](#travis-ci)

```
travis encrypt TWINFIELD_USER=$TWINFIELD_USER --add env.global
travis encrypt TWINFIELD_PASSWORD=$TWINFIELD_PASSWORD --add env.global
travis encrypt TWINFIELD_ORGANISATION=$TWINFIELD_ORGANISATION --add env.global
travis encrypt TWINFIELD_OFFICE_CODE=$TWINFIELD_OFFICE_CODE --add env.global
travis encrypt TWINFIELD_ARTICLE_CODE=$TWINFIELD_ARTICLE_CODE --add env.global
travis encrypt TWINFIELD_CUSTOMER_CODE=$TWINFIELD_CUSTOMER_CODE --add env.global
travis encrypt TWINFIELD_SALES_INVOICE_TYPE=$TWINFIELD_SALES_INVOICE_TYPE --add env.global
travis encrypt TWINFIELD_SALES_INVOICE_NUMBER=$TWINFIELD_SALES_INVOICE_NUMBER --add env.global

```

Debug PHP SOAP
--------------

[](#debug-php-soap)

```
var_dump( $this->get_wsdl_url() );
var_dump( $this->soap_client->__getFunctions() );
var_dump( $this->soap_client->__getTypes() );

try {
	$test = $this->soap_client->Query( $test );
} catch ( \Exception $e ) {
	var_dump( $e );
}

echo "REQUEST:\n" . $this->soap_client->__getLastRequest() . "\n";
```

To-do
-----

[](#to-do)

```
$client = new Client(
	$client_id,
	$client_secret,
	$redirect_uri
);

$client->set_access_token( ... );

if ( $client->is_access_token_expired() ) {

}

$authentication = {}

$authentication->get_user();

$authentication->get_user()->get_organisation();

$authentication->get_organisation();

$authentication->get_cluster_url();

$authentication->get_organisation()->get_offices();

$client = $authentication->get_client();

$client->get_organisation_service();

$offices = $organisation_service->get_offices();
```

Inspiration
-----------

[](#inspiration)

-
-
-
-
-
-
-
-
-

Design Patterns
---------------

[](#design-patterns)

- [https://en.wikipedia.org/wiki/Interpreter\_pattern](https://en.wikipedia.org/wiki/Interpreter_pattern)

Other
-----

[](#other)

-
-
-
-
-
-

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance22

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/869674?v=4)[Remco Tolsma](/maintainers/remcotolsma)[@remcotolsma](https://github.com/remcotolsma)

---

Top Contributors

[![remcotolsma](https://avatars.githubusercontent.com/u/869674?v=4)](https://github.com/remcotolsma "remcotolsma (216 commits)")

---

Tags

archiveddeprecateddeprecated-repodeprecated-repositorypronamictwinfieldwordpresswordpress-plugin

### Embed Badge

![Health badge](/badges/wp-twinfield-twinfield/health.svg)

```
[![Health](https://phpackages.com/badges/wp-twinfield-twinfield/health.svg)](https://phpackages.com/packages/wp-twinfield-twinfield)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93452.6k6](/packages/botman-driver-telegram)[pixelant/pxa-social-feed

Add Facebook, Instagram, and Twitter feeds to your site.

2349.3k](/packages/pixelant-pxa-social-feed)

PHPackages © 2026

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