[Résolu] Can you add a field with Types to the type "woocommerce order"?
This support ticket is created Il y a 4 années et 4 mois. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
Hi,
I want to add information via PHP to a field that I add with types for woocommerce orders, that is, when an order is accepted and saved in the database, I can put attached information that can be displayed when viewing the woocommerce order.
Thansk for your help.
Regards,
Hi Waqar!
Yes. I have done it. Thank you very much for your explanations. 🙂
Now I have 2 doubts about it:
- Can I make that field read-only?
- How can I enter a value in that field using PHP when the order is added?
I know I have to use the filter "woocommerce_new_order_item", but how do I enter the value I want in that field?
Hi Waqar!
I was able to save the value in the field that I created in the orders. 🙂
So I just need to know if I can define a field as read-only, so that the user cannot modify it from the dashboard, it would be just an informational field.
Thanks for your help.
Regards,