feat(upsell): apply real cart discounts and track performance

This commit is contained in:
2026-05-08 19:16:01 +03:30
parent 8345e94a1b
commit fd9d29a0ee
19 changed files with 747 additions and 206 deletions

View File

@@ -214,5 +214,16 @@ function sodino_run_migrations($from_version) {
if ($has_column($rules_table, 'actions')) {
$wpdb->query("UPDATE {$rules_table} SET actions = '[]' WHERE actions IS NULL OR actions = ''");
}
$upsell_table = $wpdb->prefix . 'sodino_upsells';
if ($has_column($upsell_table, 'id')) {
if (!$has_column($upsell_table, 'impressions')) {
$wpdb->query("ALTER TABLE {$upsell_table} ADD COLUMN impressions bigint(20) NOT NULL DEFAULT 0 AFTER priority");
}
if (!$has_column($upsell_table, 'conversions')) {
$wpdb->query("ALTER TABLE {$upsell_table} ADD COLUMN conversions bigint(20) NOT NULL DEFAULT 0 AFTER impressions");
}
}
}
}