Skip to content
Philipp edited this page Oct 24, 2021 · 8 revisions

Zammad for WordPress

This plugin helps you embed Zammad Chats & Forms into your WordPress site and gives you Access to the Zammad API if required. It is based on WordPress best practise, keeping your workplace clean by using functions, hooks and filters instead of cluttered dashboard pages.

Install

I recommend you install the package as a Composer dependency:

composer require ouun/zammad-wp

But you can also download the lastest version and install it as a regular WordPress Plugin.

Prepare

If you only need the Chat and Form functionality, only ZAMMAD_URL is required in wp-config.php:

define('ZAMMAD_URL', 'https://my-zammad.com');

If you want to interact with the Zammad API via ZammadWp Class, you will additionally need:

define('ZAMMAD_USERNAME', 'username');
define('ZAMMAD_PASSWORD', 'password');

Besides using a combination of username and password, you can alternatively give a http_token or an oauth2_token. Important: You have to activate API access in Zammad. So if you prefer to authenticate via HTTP- or AUTH-Token, please set either:

define('ZAMMAD_HTTP_TOKEN', 'token');
define('ZAMMAD_AUTH_TOKEN', 'token');

Further options are:

define('ZAMMAD_DEBUG', false); # Debug mode
define('ZAMMAD_ON_BEHALF_USER'); # User ID used to interact with the API
define('ZAMMAD_TIMEOUT', 10); # Seconds until connection timeout
Clone this wiki locally