Closed hichamboushaba closed 3 months ago
Thanks for the review @JorgeMucientes 🙏
While testing, I noticed that the meta data that is not directly tied to the subscription product metadata, is missing. If I open View custom fields from order details, I can only see is_vat_exmpt field. However, my product contains several other custom fields that are missing and are not displayed. Is that expected at this point and I missed something?
Currently, we don't offer any screen to show the metadata linked to a given product, the "View custom fields" button in the app lists only the metadata linked to the given order, so what you faced is expected. With the project we are working on now, we'll add the screen to list the product metadata as well with the ability to edit it.
Hey @hichamboushaba
Currently, we don't offer any screen to show the metadata linked to a given product, the "View custom fields" button in the app lists only the metadata linked to the given order, so what you faced is expected.
I see. I mixed up adding custom fields to products and to orders. I thought that an order that contained products with custom fields would reflect the custom fields for the product (not only for the order itself). Thanks for clarifying!
Good to go :shipit:
First of all, sorry for the size of the PR, fixing the tests caused more changes than I anticipated, and it's not easy to split this work further.
This PR adds the third part of the metadata refactor for Woo parts, the main change of the PR is to handle saving the product's metadata in the separate table
MetaData
, and this happens at every product persist call.This required some other changes:
WCProductModel
table with two columns to store the bundle min/max sizes, these values were saved as virtual meta (by virtual I mean it's not real metadata coming from the API) data previously, and this was getting on our way to get rid of themetadata
column.addons
from the WCProductModel, and moves it to the addons DTO itself.I'll add additional comments below for places where I consider it necessary for understanding.
Testing