get_option('onwebchat_wc_last_bulk_sync', 0), 'in_progress' => get_option('onwebchat_wc_bulk_in_progress', false), 'done' => get_option('onwebchat_wc_bulk_done', 0), 'total' => get_option('onwebchat_wc_bulk_total', 0), 'last_sync_start' => get_option('onwebchat_wc_last_sync_start', 0), ); // Calculate cooldown status $cooldown_period = 5 * 60; // 5 minutes // 5min // 5 * 60 //also in the file woocommerce-sync.php $time_since_last_sync = time() - $sync_status['last_sync_start']; $is_in_cooldown = ($time_since_last_sync < $cooldown_period) && $sync_status['last_sync_start'] > 0; $cooldown_remaining = $is_in_cooldown ? ceil(($cooldown_period - $time_since_last_sync) / 60) : 0; ?>
WooCommerce settings saved successfully!
⚠️ WooCommerce Sync Authentication Error:
This usually happens when:
Solution: Please enter your onWebChat account credentials again in the "Connect WooCommerce Sync" section below and click "Connect WooCommerce Sync" button to reconnect.
Let your AI chatbot understand your WooCommerce products. When enabled, products are automatically synced and kept up to date, allowing the AI to answer product-related questions accurately.
To enable WooCommerce sync, please enter your onWebChat account credentials below.
Let your AI chatbot answer "where is my order?" with live data from WooCommerce. When a customer asks about their order, the AI securely looks it up in real time and replies with the current status, items and tracking, but only after verifying the customer's identity.
|
|
⏳ Sync in progress: / products synced
0): ?>✓ Last bulk sync:
Total products synced:
No bulk sync has been performed yet.
Bulk sync was completed recently. Your products are already up to date, and any new or updated products will be synced automatically. Bulk sync was completed recently. Your products are already up to date. Please enable "Automatically sync products to onWebChat for AI training" above to keep all your products synced automatically. Click to sync all existing products. This process runs in the background and may take several minutes depending on your product count.
= total OR in progress for more than 3 minutes) $stuck_sync = $sync_status['in_progress'] && ( $sync_status['done'] >= $sync_status['total'] || (time() - $sync_status['last_sync_start'] > 180) ); if ($stuck_sync): ?>If sync appears stuck, try processing manually or reset status.