My problem: I am using WooCommerce. And I want each user to be able to define an extra attribute for the products. This attribute will be used to calculate the price of the product. I already have the function to recalculate the price according to other parameters. But now, I wanted to obtain the value that the user-defined or not for a given product.
For example, I have the products: A, B, C, and D. And, the user defines on his profile page that product A has a value of 10, and product C has a value of 15.
How can I add two fields to the profile page, choose the product (or enter the ID) and another to define the respective value? These sets of inputs are dynamic. The user can add more sets depending on whether he wants to add more values for other products.
Or is that another suggestion to solve my problem ?! I looked for solutions so that each user could define a custom attribute in the product, but I found nothing.