LiveBot.cz

Help

LiveBot plugin for WordPress

Installation, store features and filters for developers.

The LiveBot plugin adds the chat window to a WordPress website without editing the theme. On a WooCommerce store it can also tell customers the status of their order, send them a tracking link and look up products. Each feature is switched on separately and the bot gets only what you allow.

Installation

  1. Download the plugin (ZIP). In the WordPress admin open Plugins → Add New → Upload Plugin, choose the downloaded file, install and activate it. The plugin is waiting for approval in the WordPress.org directory; after that you will also find it directly in WordPress as “LiveBot”.
  2. In your LiveBot account open Widget / installation and copy the website key (it starts with wb_live_).
  3. In WordPress open Settings → LiveBot, paste the key, tick Show the chat window on the website and save.

Your website's domain must be allowed in your LiveBot account (Widget / installation → Allowed domains), otherwise the chat window does not appear.

Switching from the manual code? You can remove the manual <script … widget.js> from the theme or from a code-snippet plugin. If it stays there, the chat still appears only once — the second copy is skipped.

Settings

Option What it does
Website key Connects the plugin to your LiveBot account.
Chat window Until you enable it, the plugin loads nothing on your website.
Language Language of the chat window controls. Automatic = by page language. The bot replies in the language the visitor writes in.
Cart and checkout WooCommerce only: the chat window is not shown in the cart and at checkout.

The plugin settings are in English, or in Czech when WordPress (or your user) is set to Czech.

Store features (WooCommerce)

Each feature is switched on and off separately; the default is off. A switched-off feature gives the bot no data, with immediate effect.

Feature What the bot gets When
Order status number, status (as named in WooCommerce), date, total, currency, shipping method only when the customer gives the order number and the e-mail used for the order
Shipment tracking carrier, tracking number, tracking link same as order status
Product search name, price, currency, availability, category, link public data, no verification

The bot never gets the address, phone number or order items. A missing order and a wrong e-mail look the same — nobody can use the bot to find out which order numbers exist.

Connecting to LiveBot

  1. In Settings → LiveBot switch on the features the bot should use.
  2. Below them you will find the store address and the connection code.
  3. In your LiveBot account open System integrations, choose the “WordPress – LiveBot plugin” template, paste the address and the code and confirm.

Treat the code like a password. Create a new connection code replaces it; the old one stops working and the new one must be pasted into LiveBot.

System integrations are available in the Plus, Pro and Enterprise plans.

What the plugin reads

Standard WooCommerce data only:

  • an order by the number the customer sees — including custom numbering from plugins that store it in _order_number or add it to the WooCommerce order search;
  • the order status as WooCommerce names it;
  • shipments from the official Shipment Tracking extension and from Advanced Shipment Tracking;
  • products via wc_get_products() (published and visible in search only).

Anything else — another carrier plugin, custom numbering, extra fields — is added with filters (below).

Filters for developers

Put the code in your theme (functions.php of a child theme) or in your own plugin, not in the LiveBot plugin files — those are overwritten on update.

livebot_order_tracking — shipments from a carrier plugin

/**
 * Example: a carrier plugin stores the tracking number in order meta.
 * Find the meta key and the tracking URL in your plugin's documentation.
 */
add_filter( 'livebot_order_tracking', function ( $shipments, $order ) {
	$number = $order->get_meta( '_my_tracking_number' );
	if ( $number ) {
		$shipments[] = array(
			'carrier' => 'PPL',
			'number'  => $number,
			'url'     => 'https://www.ppl.cz/vyhledat-zasilku?shipmentId=' . rawurlencode( $number ),
		);
	}
	return $shipments;
}, 10, 2 );

The plugin takes at most three shipments and only the carrier, number and url fields.

livebot_find_order — custom order numbering

add_filter( 'livebot_find_order', function ( $order, $number ) {
	if ( $order ) {
		return $order; // the standard lookup already found it
	}
	$found = wc_get_orders( array(
		'limit'      => 2,
		'meta_key'   => '_my_order_number',
		'meta_value' => $number,
	) );
	return 1 === count( $found ) ? $found[0] : null;
}, 10, 2 );

The e-mail check always runs afterwards — the filter cannot bypass it.

livebot_order_data — order fields for the bot

add_filter( 'livebot_order_data', function ( $data, $order ) {
	$data['delivery_date'] = $order->get_meta( '_delivery_date' );
	return $data;
}, 10, 2 );

The filter cannot change the number and email fields (LiveBot verifies the match with them). The bot sees an added field once you add it to the response mapping of the “Order status” action in your LiveBot account (e.g. key delivery, path delivery_date).

livebot_product_search_args — the product query

add_filter( 'livebot_product_search_args', function ( $args, $request ) {
	$args['stock_status'] = 'instock'; // offer in-stock products only
	return $args;
}, 10, 2 );

The plugin always enforces published products and a result limit.

livebot_product_data — product fields

add_filter( 'livebot_product_data', function ( $item, $product ) {
	if ( has_term( 'wholesale', 'product_cat', $product->get_id() ) ) {
		return false; // the bot does not offer this product
	}
	$item['delivery'] = $product->get_meta( '_delivery_time' );
	return $item;
}, 10, 2 );

livebot_show_widget — where the chat window appears

add_filter( 'livebot_show_widget', function ( $show ) {
	return is_page( 'black-friday' ) ? false : $show;
} );

Troubleshooting

Problem What to check
The chat window does not appear Key filled in, “Show the chat window” ticked, domain allowed in LiveBot, cache of your caching/optimization plugin cleared.
The bot does not give order status Feature enabled in the plugin, template connected in LiveBot with the right code, Plus plan or higher. The customer must give the e-mail used for the order.
The integration says “The system rejected the credentials” The connection code in LiveBot does not match the plugin (a new one was created).
A test call says “The feature is switched off” The feature is switched off in the plugin. The bot offers the customer another way (contact, an operator).
Call error The site needs HTTPS and a working /wp-json/; security plugins or a firewall (Cloudflare) sometimes block it.
Shipment tracking is empty The carrier plugin stores shipments its own way — connect it with the livebot_order_tracking filter.

Uninstalling

Deleting the plugin removes its settings and the connection code. The data in your LiveBot account stays; the account is closed separately on livebot.cz.