| @@ -69,9 +69,9 @@ | ||
| 69 | 69 | <p><strong>Solution:</strong> Please enter your onWebChat account credentials again in the "Connect WooCommerce Sync" section below and click "Connect WooCommerce Sync" button to reconnect.</p> |
| 70 | 70 | </div> |
| 71 | 71 | <?php endif; ?> |
| 72 | 72 | |
| 73 | - <h2>WooCommerce Product Sync</h2> | |
| 73 | + <h2>Product Sync for the AI Chatbot</h2> | |
| 74 | 74 | <p> |
| 75 | 75 | Let your AI chatbot understand your WooCommerce products. |
| 76 | 76 | When enabled, products are automatically synced and kept up to date, allowing the AI to answer product-related questions accurately. |
| 77 | 77 | </p> |
| @@ -1051,8 +1051,12 @@ | ||
| 1051 | 1051 | success: function(response) { |
| 1052 | 1052 | if (!response || !response.success) { owcSyncFail((response && response.data) || 'Could not start sync'); return; } |
| 1053 | 1053 | var total = response.data.total || 0; |
| 1054 | 1054 | owcSyncProgress(0, total); |
| 1055 | + // Starting a sync switches automatic sync on server-side; show it. | |
| 1056 | + if (response.data.auto_sync_enabled) { | |
| 1057 | + $('#onwebchat_wc_sync_enabled').prop('checked', true); | |
| 1058 | + } | |
| 1055 | 1059 | if (total === 0) { |
| 1056 | 1060 | alert('No products found to sync.'); |
| 1057 | 1061 | $btn.prop('disabled', false); |
| 1058 | 1062 | owcUpdateSyncButtonLabel(); |