One of the greatest things about WooCommerce is the flexibility it gives you as a store owner. I’m currently working on a side project where I needed to add some custom data to a product when adding it to the cart. Using hooks means I can achieve this quite easily. In the following tutorial I will guide you through the process of adding a field to your product, showing that data in your cart, saving it to the order, and then displaying it to the customer and admin users. This is an advanced tutorial. You’re best off building this functionality into a custom plugin, but I’ll leave that decision up to you. Add a Custom Field to Your Product Firstly, we’ll want to add a custom field to our product. Let’s consider this scenario as our example; you run a store which makes custom engraved wooden signs. You want your customer to be able to enter the text for their engraving into an input field on your product, which is then saved with the order for the production team to start building the sign. I have set up a simple product 1 to act as the base of our customisable product. Before the add to cart button, let’s add a simple input field called “Engraving”.
Share This

We are using cookies on our website

Please confirm, if you accept our tracking cookies. You can also decline the tracking, so you can continue to visit our website without any data sent to third party services.