Skip to content

Fix the build#327

Closed
omnicolor wants to merge 14 commits intodevelopfrom
fix-build
Closed

Fix the build#327
omnicolor wants to merge 14 commits intodevelopfrom
fix-build

Conversation

@omnicolor
Copy link
Copy Markdown
Contributor

No description provided.

@omnicolor omnicolor changed the title Try copying... Fix the build Mar 7, 2025
The `wc_save_order_items()` method expects something like:
```json
{
  "order_taxes": {
    "33": "4"
  },
  "order_item_id": [
    "28",
    "29"
  ],
  "order_item_tax_class": {
    "28": "",
    "29": ""
  },
  "order_item_qty": {
    "28": "1",
    "29": "1"
  },
  "refund_order_item_qty": {
    "28": "",
    "29": ""
  },
  "line_subtotal": {
    "28": "19.99",
    "29": "9.99"
  },
  "line_total": {
    "28": "19.99",
    "29": "9.99"
  },
  "refund_line_total": {
    "28": "",
    "29": ""
  },
  "line_subtotal_tax": {
    "28": {
      "4": "0"
    },
    "29": {
      "4": "0"
    }
  },
  "line_tax": {
    "28": {
      "4": "0"
    },
    "29": {
      "4": "0"
    }
  },
  "refund_line_tax": {
    "28": {
      "4": ""
    },
    "29": {
      "4": ""
    }
  }
}
```
where each named field has the corresponding values for the two line
items.

What we were sending Woo before looked like:
```json
{
  "order_taxes33": "4",
  "order_item_id": "29",
  "order_item_tax_class28": "",
  "order_item_qty28": "1",
  "refund_order_item_qty28": "",
  "line_subtotal28": "19.99",
  "line_total28": "19.99",
  "refund_line_total28": "",
  "line_subtotal_tax284": "0",
  "line_tax284": "0",
  "refund_line_tax284": "",
  "order_item_tax_class29": "",
  "order_item_qty29": "1",
  "refund_order_item_qty29": "",
  "line_subtotal29": "9.99",
  "line_total29": "9.99",
  "refund_line_total29": "",
  "line_subtotal_tax294": "0",
  "line_tax294": "0",
  "refund_line_tax294": ""
}
```
which is not very useful.
@omnicolor omnicolor requested a review from bjongbloedt March 14, 2025 13:02
@omnicolor omnicolor removed the request for review from bjongbloedt March 21, 2025 00:56
@omnicolor
Copy link
Copy Markdown
Contributor Author

Superceded by #332.

@omnicolor omnicolor closed this Apr 5, 2025
@omnicolor omnicolor deleted the fix-build branch April 5, 2025 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant