Skip to content

Fix/build#332

Open
bjongbloedt wants to merge 19 commits intodevelopfrom
fix/build
Open

Fix/build#332
bjongbloedt wants to merge 19 commits intodevelopfrom
fix/build

Conversation

@bjongbloedt
Copy link
Copy Markdown

No description provided.

omnicolor and others added 19 commits March 7, 2025 02:16
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.
Copy link
Copy Markdown
Contributor

@omnicolor omnicolor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woot, a passing build!

@omnicolor omnicolor mentioned this pull request Apr 5, 2025
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.

3 participants