Installing Botoscope on your WooCommerce store
Once you’ve created your bot, follow these steps to connect your WooCommerce site to Botoscope:
π Step 1: Edit your wp-config.php file
On your server, open the wp-config.php file of your WordPress installation and add the following lines before the line:
/* That's all, stop editing! Happy publishing. */
Use the following code (example values shown):
define('BOTOSCOPE_BOT_TOKEN', '123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11');
define('BOTOSCOPE_BOT_NAME', 'myshop_bot');
define('BOTOSCOPE_PROXY_SERVER', 'https://c12-t2hx7w.s2.botoscope.com');
define('BOTOSCOPE_CLIENT_API_KEY', 'bs-4a83c23c-7410ebfa-ac4z2ba3-b42c4a3f');
define('BOTOSCOPE_CLIENT_PASS', '6Jw6rzVxfdjwBEMtxtl');
define('BOTOSCOPE_ADMIN_CHAT_ID', 1234567890);
After activating your bot in the Botoscope system, you will see all required credentials (token, username, proxy server, API key, and client pass) directly in your dashboard.
Just copy them and paste into your
wp-config.php file.π€ Database Charset Configuration (Critical for Emoji Support)
wp-config.phpβ οΈ The Problem
Many WordPress installations still use the old utf8 charset, which does NOT support emojis. This will cause:
- β Emojis being stripped from product names/descriptions
- β Database errors when saving emoji content
- β Orders failing to create in Telegram
- β Product sync failures between WooCommerce and Telegram
β The Solution
Open your wp-config.php file and locate these lines (usually near the database settings):
β WRONG (old format - does NOT support emojis):
define('DB_CHARSET', 'utf8');
define('DB_COLLATE', '');
Change them to:
β
CORRECT (supports emojis):
define('DB_CHARSET', 'utf8mb4');
define('DB_COLLATE', 'utf8mb4_unicode_ci');
If you see a warning like
Constant DB_CHARSET already defined, these constants are already set in your wp-config.php. Simply find and update the existing values – do NOT add duplicate lines.β Important Notes:
- Make this change BEFORE installing Botoscope for best results
- Do NOT skip the
DB_COLLATEsetting – both lines are required - After changing, go to Botoscope β System Controls and click “Reset full bot data cache”
If you’ve already been using Botoscope with
utf8 charset, you’ll need to convert your existing database tables. See the “Database Encoding Configuration” section below for conversion methods.π¦ Step 2: Install the Botoscope plugin
- Log into your WordPress admin panel.
- Go to Plugins β Add New.
- Upload the Botoscope plugin ZIP file.
- Click Install Now, then Activate.
βοΈ Step 3: Run initial configuration
- In the WordPress admin panel, go to Botoscope β System Controls.
- Click the button βReset full bot data cacheβ.
- Wait a ~ minute β the site will be synchronized with your Telegram store
β Youβre done!
Your shop is now connected to the Telegram
You can now:
- Manage your products
- Configure payment systems
- Control categories and pricing
- And much more β based on your business needs
π§ Additional Features & Recommendations
π§© Product Filtering
If you want to add advanced product filtering, install the
HUSKY – WooCommerce Products Filter Professional plugin:
π https://products-filter.com/downloads
π± Currency Switching
If you want your customers to switch between currencies, install the
FOX – WooCommerce Currency Switcher Professional plugin:
π https://currency-switcher.com/downloads
π PDF Invoice Download for Customers
If you want customers to be able to download PDF invoices from the order page or email, install the plugin:
π WooCommerce PDF Invoices & Packing Slips
After installation, go to wp-admin/admin.php?page=wpo_wcpdf_options_page β Advanced tab and apply the following settings:
- Document link access type β
Full - Pretty document links β
Yes - In tab Tools β
Generate random temporary directory
After you have installed one or all of the recommended plugins, go to the Botoscope settings, open the System Controls tab, and click the “Reset full bot data cache” button.
π€ Database Encoding Configuration (For Emoji Support)
π― Choose Your Method:
We offer three easy ways to fix the encoding. Choose the one that works best for you:
- Method 1: One-Click Plugin (Easiest!) π
- Method 2: PHP Code (For developers) π»
- Method 3: Direct SQL (Most control) π§
β¨ Method 1: One-Click Plugin (Recommended for Beginners)
This is the easiest method – just install a plugin and click one button!
- In WordPress admin, go to Plugins β Add New
- Search for “WP phpMyAdmin Extension”
- Install and activate the plugin: WP phpMyAdmin Extension
- Go to Tools β phpMyAdmin in WordPress admin
- Click on the SQL tab
- Copy and paste the SQL commands from Method 3 below
- Click Go
π» Method 2: One-Time PHP Code
If you’re comfortable editing PHP files, this method executes the conversion automatically when you load a page.
Option A: Via WordPress functions.php (Temporary)
- Go to Appearance β Theme File Editor
- Open functions.php (right sidebar)
- Add this code at the very end of the file:
// TEMPORARY: Convert database to UTF8MB4
// DELETE THIS CODE AFTER RUNNING ONCE!
add_action('admin_init', function() {
if (!get_option('botoscope_db_converted_utf8mb4')) {
global $wpdb;
$prefix = $wpdb->prefix;
// WooCommerce tables
$tables = [
'woocommerce_order_items',
'woocommerce_order_itemmeta',
'woocommerce_payment_tokens',
'woocommerce_payment_tokenmeta',
'woocommerce_sessions',
'woocommerce_shipping_zones',
'woocommerce_shipping_zone_locations',
'woocommerce_shipping_zone_methods',
'woocommerce_tax_rates',
'woocommerce_tax_rate_locations',
];
// Botoscope tables
$botoscope_tables = [
'botoscope_advertising',
'botoscope_booking_reservations',
'botoscope_booking_slots',
'botoscope_booking_slots_targeted',
'botoscope_broadcast',
'botoscope_controls',
'botoscope_elogios',
'botoscope_extensions',
'botoscope_interface_translations',
'botoscope_marketing_campaigns',
'botoscope_marketing_campaigns_products',
'botoscope_marketing_campaigns_products_excluded',
'botoscope_marketing_campaigns_terms',
'botoscope_marketing_strategies',
'botoscope_marketing_strategies_formulas',
];
$all_tables = array_merge($tables, $botoscope_tables);
foreach ($all_tables as $table) {
$full_table = $prefix . $table;
$wpdb->query("ALTER TABLE {$full_table} CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci");
}
update_option('botoscope_db_converted_utf8mb4', time());
echo ''; } });
β Database successfully converted to UTF8MB4! You can now delete the code from functions.php
- Click Update File
- Go to any page in WordPress admin (like Dashboard)
- You’ll see a success message when conversion is complete
- IMPORTANT: Go back to functions.php and DELETE the code you just added
Option B: Via Standalone PHP File
- Create a new file called
convert-db.phpin your WordPress root directory - Paste this code into the file:
<?php
// Load WordPress
require_once('wp-load.php');
if (!current_user_can('manage_options')) {
die('Access denied');
}
global $wpdb;
$prefix = $wpdb->prefix;
echo '<h1>Converting Database to UTF8MB4...</h1>';
// WooCommerce tables
$tables = [
'woocommerce_order_items',
'woocommerce_order_itemmeta',
'woocommerce_payment_tokens',
'woocommerce_payment_tokenmeta',
'woocommerce_sessions',
'woocommerce_shipping_zones',
'woocommerce_shipping_zone_locations',
'woocommerce_shipping_zone_methods',
'woocommerce_tax_rates',
'woocommerce_tax_rate_locations',
];
// Botoscope tables
$botoscope_tables = [
'botoscope_advertising',
'botoscope_booking_reservations',
'botoscope_booking_slots',
'botoscope_booking_slots_targeted',
'botoscope_broadcast',
'botoscope_controls',
'botoscope_elogios',
'botoscope_extensions',
'botoscope_interface_translations',
'botoscope_marketing_campaigns',
'botoscope_marketing_campaigns_products',
'botoscope_marketing_campaigns_products_excluded',
'botoscope_marketing_campaigns_terms',
'botoscope_marketing_strategies',
'botoscope_marketing_strategies_formulas',
];
$all_tables = array_merge($tables, $botoscope_tables);
foreach ($all_tables as $table) {
$full_table = $prefix . $table;
echo "Converting {$full_table}... ";
$result = $wpdb->query("ALTER TABLE {$full_table} CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci");
if ($result !== false) {
echo '<span style="color: green;">β
Success</span><br>';
} else {
echo '<span style="color: red;">β Failed: ' . $wpdb->last_error . '</span><br>';
}
}
echo '<h2 style="color: green;">β
Conversion Complete!</h2>';
echo '<p><strong>IMPORTANT:</strong> Delete this file (convert-db.php) from your server now!</p>';
?>
- Upload the file to your WordPress root directory (where
wp-config.phpis located) - Open your browser and go to:
https://yoursite.com/convert-db.php - Wait for the conversion to complete
- IMPORTANT: Delete the
convert-db.phpfile from your server!
π§ Method 3: Direct SQL in phpMyAdmin
This is the most direct method if you’re comfortable using phpMyAdmin.
π Step-by-step instructions:
- Log into your hosting control panel (cPanel, Plesk, etc.)
- Open phpMyAdmin
- Select your WordPress database from the left sidebar
- Click on the SQL tab at the top
- Copy and paste the SQL commands below
- Click Go to execute
π‘ Note about table prefix: The commands below use wp_ as the table prefix. If your WordPress installation uses a different prefix (like wpdb_ or wp123_), you need to replace wp_ with your actual prefix in all commands below.
To find your prefix, look at the table names in phpMyAdmin – they all start with the same prefix.
-- Convert WooCommerce tables ALTER TABLE wp_woocommerce_order_items CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE wp_woocommerce_order_itemmeta CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE wp_woocommerce_payment_tokens CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE wp_woocommerce_payment_tokenmeta CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE wp_woocommerce_sessions CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE wp_woocommerce_shipping_zones CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE wp_woocommerce_shipping_zone_locations CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE wp_woocommerce_shipping_zone_methods CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE wp_woocommerce_tax_rates CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE wp_woocommerce_tax_rate_locations CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -- Convert Botoscope tables ALTER TABLE wp_botoscope_advertising CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE wp_botoscope_booking_reservations CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE wp_botoscope_booking_slots CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE wp_botoscope_booking_slots_targeted CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE wp_botoscope_broadcast CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE wp_botoscope_controls CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE wp_botoscope_elogios CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE wp_botoscope_extensions CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE wp_botoscope_interface_translations CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE wp_botoscope_marketing_campaigns CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE wp_botoscope_marketing_campaigns_products CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE wp_botoscope_marketing_campaigns_products_excluded CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE wp_botoscope_marketing_campaigns_terms CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE wp_botoscope_marketing_strategies CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE wp_botoscope_marketing_strategies_formulas CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -- Convert core WordPress tables (optional but recommended) ALTER TABLE wp_posts CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE wp_postmeta CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE wp_comments CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE wp_commentmeta CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE wp_terms CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE wp_term_taxonomy CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE wp_term_relationships CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE wp_termmeta CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE wp_users CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE wp_usermeta CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE wp_options CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE wp_links CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
β After Conversion (All Methods):
- Go to Botoscope β System Controls in your WordPress admin
- Click “Reset full bot data cache”
- Test creating an order with emoji in product name – it should work now! β¨