fix: category selection, checkout redirect, sidebar shipping visibility

1. Category Selection Bug:
   - Added 'id' alias to category/tag API responses
   - Frontend uses cat.id which was undefined (API returned term_id)

2. Checkout Redirect:
   - Changed from window.location.href + reload to navigate()
   - Added !isProcessing check to empty cart condition

3. Sidebar Shipping for Virtual-Only:
   - Hide Shipping Method section when isVirtualOnly
   - Hide Shipping row in totals when isVirtualOnly

4. License Table:
   - Table creation runs via ensure_tables() on plugins_loaded
This commit is contained in:
Dwindi Ramadhana
2026-01-07 22:26:58 +07:00
parent 2cc20ff760
commit 3a08e80c1f
2 changed files with 16 additions and 12 deletions

View File

@@ -621,6 +621,7 @@ class ProductsController {
$categories = [];
foreach ($terms as $term) {
$categories[] = [
'id' => $term->term_id,
'term_id' => $term->term_id,
'name' => $term->name,
'slug' => $term->slug,
@@ -649,6 +650,7 @@ class ProductsController {
$tags = [];
foreach ($terms as $term) {
$tags[] = [
'id' => $term->term_id,
'term_id' => $term->term_id,
'name' => $term->name,
'slug' => $term->slug,